summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-09-12 23:19:19 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-03-17 22:56:19 +0000
commitfba16f2050f6ed044b644cba2ce6381ba0e686ae (patch)
tree3a27eade32adedd7d30599a54764b321ba4c6f04 /media-libs
parentsys-kernel/gentoo-sources: Clean-up of the 5.5.X series (diff)
downloadgentoo-fba16f2050f6ed044b644cba2ce6381ba0e686ae.tar.gz
gentoo-fba16f2050f6ed044b644cba2ce6381ba0e686ae.tar.bz2
gentoo-fba16f2050f6ed044b644cba2ce6381ba0e686ae.zip
media-libs/libjpeg-turbo: Use CMake for extra tools instead of Make
Debian's Makefile doesn't allow for executables with file extensions like .exe on Windows. Being their Makefile for their OS, I suspect they don't care about supporting Gentoo, let alone Windows. This has been done in a generic way in case more tools are added. Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/libjpeg-turbo/libjpeg-turbo-2.0.4.ebuild48
1 files changed, 26 insertions, 22 deletions
diff --git a/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.4.ebuild b/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.4.ebuild
index 0a16a62f0f58..35f5d3a2c6b2 100644
--- a/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.4.ebuild
+++ b/media-libs/libjpeg-turbo/libjpeg-turbo-2.0.4.ebuild
@@ -36,6 +36,29 @@ DEPEND="${COMMON_DEPEND}
MULTILIB_WRAPPED_HEADERS=( /usr/include/jconfig.h )
src_prepare() {
+ local FILE
+ ln -snf ../debian/extra/*.c . || die
+
+ for FILE in ../debian/extra/*.c; do
+ FILE=${FILE##*/}
+ cat >> CMakeLists.txt <<EOF || die
+add_executable(${FILE%.c} ${FILE})
+install(TARGETS ${FILE%.c})
+EOF
+ done
+
+ for FILE in ../debian/extra/exifautotran; do
+ cat >> CMakeLists.txt <<EOF || die
+install(FILES \${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DESTINATION \${CMAKE_INSTALL_BINDIR})
+EOF
+ done
+
+ for FILE in ../debian/extra/*.[0-9]*; do
+ cat >> CMakeLists.txt <<EOF || die
+install(FILES \${CMAKE_CURRENT_SOURCE_DIR}/${FILE} DESTINATION \${CMAKE_INSTALL_MANDIR}/man${FILE##*.})
+EOF
+ done
+
default
cmake_src_prepare
@@ -58,31 +81,12 @@ multilib_src_configure() {
cmake_src_configure
}
-multilib_src_compile() {
- cmake_src_compile
-
- if multilib_is_native_abi ; then
- pushd "${WORKDIR}/debian/extra" &>/dev/null || die
- emake CC="$(tc-getCC)" CFLAGS="${LDFLAGS} ${CFLAGS}"
- popd &>/dev/null || die
- fi
-}
-
multilib_src_install() {
cmake_src_install
- if multilib_is_native_abi ; then
- pushd "${WORKDIR}/debian/extra" &>/dev/null || die
- emake \
- DESTDIR="${D}" prefix="${EPREFIX}"/usr \
- INSTALL="install -m755" INSTALLDIR="install -d -m755" \
- install
-
- popd || die
- if use java ; then
- rm -rf "${ED}"/usr/classes || die
- java-pkg_dojar java/turbojpeg.jar
- fi
+ if multilib_is_native_abi && use java ; then
+ rm -rf "${ED}"/usr/classes || die
+ java-pkg_dojar java/turbojpeg.jar
fi
}