Skip to content

Commit

Permalink
media-libs/devil: Port to EAPI 6
Browse files Browse the repository at this point in the history
Gentoo-bug: 600188
* Make PATCHES -p1 compliant
* Delete .la files unconditionally

Package-Manager: portage-2.3.3
  • Loading branch information
SoapGentoo committed Dec 6, 2016
1 parent 398c476 commit 9f4a47a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 22 deletions.
29 changes: 21 additions & 8 deletions media-libs/devil/devil-1.7.8-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
inherit autotools eutils
EAPI=6

inherit autotools

MY_P=DevIL-${PV}

Expand All @@ -14,9 +15,10 @@ SRC_URI="mirror://sourceforge/openil/${MY_P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ~arm ~mips ppc ppc64 x86"
IUSE="allegro gif glut jpeg jpeg2k mng nvtt openexr opengl png sdl cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 static-libs tiff xpm X"
IUSE="allegro cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 gif glut jpeg jpeg2k mng nvtt openexr opengl png sdl static-libs tiff X xpm"

RDEPEND="allegro? ( media-libs/allegro:0 )
RDEPEND="
allegro? ( media-libs/allegro:0 )
gif? ( media-libs/giflib:= )
glut? ( media-libs/freeglut )
jpeg? ( virtual/jpeg:0 )
Expand All @@ -29,16 +31,25 @@ RDEPEND="allegro? ( media-libs/allegro:0 )
png? ( media-libs/libpng:0= )
sdl? ( media-libs/libsdl )
tiff? ( media-libs/tiff:0 )
xpm? ( x11-libs/libXpm )
X? ( x11-libs/libXext
x11-libs/libX11
x11-libs/libXrender )"
x11-libs/libXrender )
xpm? ( x11-libs/libXpm )"
DEPEND="${RDEPEND}
virtual/pkgconfig
X? ( x11-proto/xextproto )"

PATCHES=(
"${FILESDIR}/${P}"-CVE-2009-3994.patch
"${FILESDIR}/${P}"-libpng14.patch
"${FILESDIR}/${P}"-nvtt-glut.patch
"${FILESDIR}/${P}"-ILUT.patch
"${FILESDIR}/${P}"-restrict.patch
"${FILESDIR}/${P}"-fix-test.patch
)

src_prepare() {
epatch "${FILESDIR}"/${P}-{CVE-2009-3994,libpng14,nvtt-glut,ILUT,restrict,fix-test}.patch
default
eautoreconf
}

Expand Down Expand Up @@ -74,5 +85,7 @@ src_configure() {

src_install() {
default
use static-libs || prune_libtool_files

# package provides .pc files
find "${D}" -name '*.la' -delete || die
}
4 changes: 2 additions & 2 deletions media-libs/devil/files/devil-1.7.8-CVE-2009-3994.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
http://bugs.gentoo.org/297760

--- src-IL/src/il_dicom.c
+++ src-IL/src/il_dicom.c
--- a/src-IL/src/il_dicom.c
+++ b/src-IL/src/il_dicom.c
@@ -427,9 +427,11 @@ ILboolean GetUID(ILubyte *UID)
return IL_FALSE;

Expand Down
4 changes: 2 additions & 2 deletions media-libs/devil/files/devil-1.7.8-ILUT.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Date: Thu May 3 22:23:21 UTC 2012

use_x11=no was not set when --disable-x11 was

--- m4/devil-api_checks.m4
+++ m4/devil-api_checks.m4
--- a/m4/devil-api_checks.m4
+++ b/m4/devil-api_checks.m4
@@ -137,7 +137,8 @@
[main],
[dnl The use_x11 var is either "yes" already, or we don't want "no" to be overwritten
Expand Down
4 changes: 2 additions & 2 deletions media-libs/devil/files/devil-1.7.8-fix-test.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/devil-1.7.8/test/Makefile.am
+++ b/devil-1.7.8/test/Makefile.am
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -12,5 +12,6 @@ else
testil_LDADD += ../lib/libIL.la
endif
Expand Down
16 changes: 8 additions & 8 deletions media-libs/devil/files/devil-1.7.8-nvtt-glut.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Subject: build system
remove automagic handling of glut and add configure option
fix "header present but cannot be compiled" warning for nvtt

--- m4/ax_check_glut.m4
+++ m4/ax_check_glut.m4
--- a/m4/ax_check_glut.m4
+++ b/m4/ax_check_glut.m4
@@ -114,4 +114,11 @@

AC_SUBST([GLUT_CFLAGS])
Expand All @@ -19,8 +19,8 @@ fix "header present but cannot be compiled" warning for nvtt
+ [enable_glut="yes"])
+
])dnl
--- m4/devil-api_checks.m4
+++ m4/devil-api_checks.m4
--- a/m4/devil-api_checks.m4
+++ b/m4/devil-api_checks.m4
@@ -31,8 +31,8 @@
AS_IF([test "x$no_gl" != "xyes" -a "x$no_glu" != "xyes"],
[use_ogl="yes"
Expand All @@ -32,8 +32,8 @@ fix "header present but cannot be compiled" warning for nvtt
ILUT_LIBS="$GLUT_LIBS $ILUT_LIBS"])
AC_DEFINE([ILUT_USE_OPENGL],
[1],
--- configure.ac
+++ configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -343,8 +343,10 @@
[Do you want to use the Nvidia texture tools if possible? (enables GPU accelerated image manipulation, default="yes")]) ],
[],
Expand Down Expand Up @@ -65,8 +65,8 @@ fix "header present but cannot be compiled" warning for nvtt
[EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_gl ILUT_volume"])

dnl Win32
--- bin/Makefile.am
+++ bin/Makefile.am
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -45,11 +45,11 @@
examples_PROGRAMS += ILUT_animation
endif #USE_W32
Expand Down

0 comments on commit 9f4a47a

Please sign in to comment.