From owner-svn-ports-head@freebsd.org Tue Mar 28 09:05:40 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE4CDD22863; Tue, 28 Mar 2017 09:05:40 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9A42D9; Tue, 28 Mar 2017 09:05:40 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S95d7i083472; Tue, 28 Mar 2017 09:05:39 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S95dXX083469; Tue, 28 Mar 2017 09:05:39 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201703280905.v2S95dXX083469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Tue, 28 Mar 2017 09:05:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r437106 - in head/graphics: digikam-kde4 kipi-plugin-ipodexport/files kipi-plugins-kde4/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 09:05:40 -0000 Author: rakuco Date: Tue Mar 28 09:05:39 2017 New Revision: 437106 URL: https://svnweb.freebsd.org/changeset/ports/437106 Log: Unbreak kipi-plugin-* after r436971. The kipi-plugin-* ports are all built from the same tarball, which is also used to build kipi-plugins-kde4 as well. Upstream does not expect this to happen, and refers to libkipiplugins.so as the "kipiplugins" target in CMake. Since we build everything separately, each plugin's build system code does not know this target, which results in -lkipiplugins (without -L/path/to) being passed to the linker instead of /path/to/libkipiplugins.so. Fix it by looking for libkipiplugins.so via CMake and using that result in each port. kipi-plugin-ipodexport needs an additional but similar fix, in that it should look for libgpod using CMake instead of using pkg-config's results directly, as the latter do not contain full paths. Reviewed by: tcberner Added: head/graphics/kipi-plugin-ipodexport/files/ head/graphics/kipi-plugin-ipodexport/files/patch-cmake_modules_FindIpod.cmake (contents, props changed) Modified: head/graphics/digikam-kde4/Makefile.common head/graphics/kipi-plugins-kde4/files/extrapatch-CMakeLists.txt Modified: head/graphics/digikam-kde4/Makefile.common ============================================================================== --- head/graphics/digikam-kde4/Makefile.common Tue Mar 28 09:02:02 2017 (r437105) +++ head/graphics/digikam-kde4/Makefile.common Tue Mar 28 09:05:39 2017 (r437106) @@ -144,5 +144,20 @@ BUILD_WRKSRC= ${WRKSRC}/${${KIPI_PLUGIN} INSTALL_WRKSRC= ${BUILD_WRKSRC} ${KIPI_PLUGIN}_DIR?= ${KIPI_PLUGIN} + +.if ${KIPI_PLUGIN} != "libkipiplugins" +# Each plugin is built separately from the same tarball. The upstream build +# process expects a single build for all plugins, which includes building +# libkipiplugins itself. +# Adjust it (together with extrapatch-CMakeLists.txt in +# graphics/kipi-plugins-kde4) by actually looking for libkipiplugins with +# find_library() and linking against it instead of ending up just passing +# "-lkipiplugins" to the linker because of the way we build these ports. +post-patch: kipi-plugin-post-patch +kipi-plugin-post-patch: + ${FIND} ${BUILD_WRKSRC} -name CMakeLists.txt | ${XARGS} ${REINPLACE_CMD} -e \ + 's, kipiplugins, $${LIBKIPIPLUGINS_LIBRARIES},' \ + ${BUILD_WRKSRC}/CMakeLists.txt +.endif . endif # defined(KIPI_PLUGIN) .endif # !defined(NO_BUILD) Added: head/graphics/kipi-plugin-ipodexport/files/patch-cmake_modules_FindIpod.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/kipi-plugin-ipodexport/files/patch-cmake_modules_FindIpod.cmake Tue Mar 28 09:05:39 2017 (r437106) @@ -0,0 +1,26 @@ +Always look for libgpod using CMake instead of just using the pkg-config call +directly, as the latter does not use full paths. +--- cmake/modules/FindIpod.cmake ++++ cmake/modules/FindIpod.cmake +@@ -14,12 +14,6 @@ if (IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) + SET(IPOD_FOUND TRUE) + + else (IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) +- if(NOT WIN32) +- # use pkg-config to get the directories and then use these values +- # in the FIND_PATH() and FIND_LIBRARY() calls +- find_package(PkgConfig) +- PKG_SEARCH_MODULE(IPOD libgpod-1.0) +- else(NOT WIN32) + find_path(IPOD_INCLUDE_DIRS + NAMES + gpod/itdb.h +@@ -32,7 +26,7 @@ else (IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) + if(IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) + set(IPOD_FOUND ON) + endif(IPOD_INCLUDE_DIRS AND IPOD_LIBRARIES) +- endif(NOT WIN32) ++ + IF (IPOD_FOUND) + IF (NOT IPOD_FIND_QUIETLY) + MESSAGE(STATUS "Found libgpod-1 ${IPOD_VERSION}") Modified: head/graphics/kipi-plugins-kde4/files/extrapatch-CMakeLists.txt ============================================================================== --- head/graphics/kipi-plugins-kde4/files/extrapatch-CMakeLists.txt Tue Mar 28 09:02:02 2017 (r437105) +++ head/graphics/kipi-plugins-kde4/files/extrapatch-CMakeLists.txt Tue Mar 28 09:05:39 2017 (r437106) @@ -1,10 +1,15 @@ +The first hunk looks for libkipiplugins via CMake, as we split every kipi +plugin as well as the common code into separate ports. Not using CMake results +in "kipiplugins" in a target_link_libraries() call becoming a literal +-lkipiplugins being passed to the linker instead of /path/to/libkipiplugin.so. --- ./CMakeLists.txt.orig 2015-02-25 22:15:14.659030000 +0100 +++ ./CMakeLists.txt 2015-02-25 22:17:07.071209000 +0100 -@@ -356,7 +356,6 @@ +@@ -391,7 +391,7 @@ if(KIPI_FOUND) # Plugins which will be always compiled - add_subdirectory(common) ++ find_library(LIBKIPIPLUGINS_LIBRARIES kipiplugins) add_subdirectory(timeadjust) add_subdirectory(jpeglossless) add_subdirectory(rawconverter)