diff options
Diffstat (limited to 'media-gfx/xpaint/files')
5 files changed, 226 insertions, 0 deletions
diff --git a/media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch b/media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch new file mode 100644 index 000000000000..d6a3dab07830 --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-2.10.2-libtool-clang.patch @@ -0,0 +1,13 @@ +libtool doesn't work if compiling with clang. Need to add --tag=CC +See bug https://bugs.gentoo.org/731010 +--- a/xpaintrw/Makefile.am ++++ b/xpaintrw/Makefile.am +@@ -25,7 +25,7 @@ + + xpaint_DEFINES = $(ARCH_DEFINES) $(EXTRA_DEFINES) $(XAWLIB_DEFINES) + +-LIBTOOL = /usr/bin/libtool ++LIBTOOL = /usr/bin/libtool --tag=CC + AM_CFLAGS = @X_CFLAGS@ @SPECIAL_CFLAGS@ $(xpaint_DEFINES) + AM_YFLAGS = -d + CLEANFILES = diff --git a/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch b/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch new file mode 100644 index 000000000000..11a0b0e9a84e --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch @@ -0,0 +1,18 @@ +The original Makefile did not pass CFLAGS and LDFLAGS +See bug https://bugs.gentoo.org/727632 +Also remove -O3 and stripping, leave portage control that +--- a/util/Makefile ++++ b/util/Makefile +@@ -10,10 +10,10 @@ + endif + + pdfconcat: +- $(CC) $(CFLAGS) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat + + ppmtops: +- $(CC) $(CFLAGS) ppmtops.c -o ppmtops ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ppmtops.c -o ppmtops + + ifneq ($(WITH_PGF),no) + pgf2pnm: main.cpp pnm.cpp diff --git a/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-prefix.patch b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-prefix.patch new file mode 100644 index 000000000000..cf02a14725fa --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-prefix.patch @@ -0,0 +1,103 @@ +This patch fixes compiling xpaint inside a gentoo prefix. +There are multiple issues: + search paths hardcoded to /usr/include, + install paths outside prefix, + X resources in app-defaults with path hardcoded to /usr/share/xpaint +--- a/Makefile.am ++++ b/Makefile.am +@@ -3,7 +3,7 @@ + ## Local Configuration arguments + BINDIR = $(prefix)/bin + SHAREDIR = $(prefix)/share/xpaint +-XAPPLOADDIR = /etc/X11/app-defaults ++XAPPLOADDIR = $(sysconfdir)/X11/app-defaults + + ## Enable/disable PRINTCAP (for older BSD style printing configuration) + ## PRINTCAP = -DPRINTCAP +@@ -85,7 +85,7 @@ + .PHONY: + + version.h: +- rm -f xaw_incdir ; ln -s /usr/include/X11/Xaw3dxft xaw_incdir ++ rm -f xaw_incdir ; ln -s @includedir@/X11/Xaw3dxft xaw_incdir + echo "#define XPAINT_VERSION \"$(PACKAGE_VERSION)\"" > version.h + + substads: substads.c +@@ -149,8 +149,7 @@ + mkdir -p $(DESTDIR)$(SHAREDIR)/messages + cd share/messages ; $(RM) -f *~ ; cp -f Messages* $(DESTDIR)$(SHAREDIR)/messages + chmod -R a+r $(DESTDIR)$(SHAREDIR)/ +- cd util ; make install +- cd vxp2ps ; make install ++ cd vxp2ps ; make BINDIR=$(BINDIR) install + + clean-local: + rm -f xaw_incdir +--- a/util/Makefile ++++ b/util/Makefile +@@ -17,9 +17,9 @@ + + ifneq ($(WITH_PGF),no) + pgf2pnm: main.cpp pnm.cpp +- @if [ -x /usr/include/libpgf ] ; then \ +- $(CXX) $(CXXFLAGS) -fpermissive -c main.cpp -o main.o -I/usr/include/libpgf ; \ +- $(CXX) $(CXXFLAGS) -fpermissive -c pnm.cpp -o pnm.o -I/usr/include/libpgf ; \ ++ @if [ -x $(includedir)/libpgf ] ; then \ ++ $(CXX) $(CXXFLAGS) -fpermissive -c main.cpp -o main.o -I$(includedir)/libpgf ; \ ++ $(CXX) $(CXXFLAGS) -fpermissive -c pnm.cpp -o pnm.o -I$(includedir)/libpgf ; \ + $(CXX) $(CXXFLAGS) -fpermissive -o pgf2pnm main.o pnm.o $(LDFLAGS) -lpgf ; \ + else \ + echo "libpgf not installed !!" ; \ +--- a/configure.ac ++++ b/configure.ac +@@ -32,7 +32,7 @@ + AC_TYPE_UINT32_T + AC_TYPE_UINT64_T + +-CFLAGS="$CFLAGS -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft" ++CFLAGS="$CFLAGS -I${prefix}/include -I${prefix}/include/X11 -I${prefix}/include/X11/Xaw3dxft" + LIBS="$LIBS -lm" + echo "VERSION = $VERSION" > .version + +@@ -40,7 +40,7 @@ + AC_CHECK_LIB([X11], [XOpenDisplay], have_x11="yes") + if test x"$have_x11" = xyes; then + AC_SUBST([X_LIBS], ["-lXmu -lXt -lSM -lICE -lXext -lX11 -lXpm -ldl -rdynamic"]) +- AC_SUBST([X_CFLAGS], ["-I/usr/include/X11"]) ++ AC_SUBST([X_CFLAGS], ["-I${prefix}/include/X11"]) + else + echo "X11 libraries not installed !" + exit 1 +@@ -291,7 +291,7 @@ + fi + + if test x$enable_libopenjp2 = xyes; then +- CFLAGS="$CFLAGS -I/usr/include/openjpeg-2.3" ++ CFLAGS="$CFLAGS -I${prefix}/include/openjpeg-2.3" + LIBS="$LIBS -lopenjp2" + AC_SUBST(LIBOPENJP2_LIBS) + AC_DEFINE(HAVE_OPENJP2) +@@ -323,9 +323,9 @@ + [AC_LANG_PROGRAM([[#include <freetype2/config/ftheader.h>]])], + [AC_MSG_RESULT([already in path])], + [AC_PREPROC_IFELSE( +- [AC_LANG_PROGRAM([[#include </usr/include/freetype2/freetype/config/ftheader.h>]])], +- [AC_MSG_RESULT([/usr/include/freetype2]) +- AC_SUBST([SPECIAL_CFLAGS], ["-I/usr/include/freetype2"])], ++ [AC_LANG_PROGRAM([[#include <${prefix}/include/freetype2/freetype/config/ftheader.h>]])], ++ [AC_MSG_RESULT([${prefix}/include/freetype2]) ++ AC_SUBST([SPECIAL_CFLAGS], ["-I${prefix}/include/freetype2"])], + [AC_MSG_ERROR([cannot find freetype2 headers; try setting CFLAGS.])] + )] + ) +--- a/xpaintrw/Makefile.am ++++ b/xpaintrw/Makefile.am +@@ -13,7 +13,7 @@ + ARCH_DEFINES = -fPIC + + ## PBM_DEFINES = -DNETPBM10 +-PBM_DEFINES = -I/usr/include/netpbm -DNETPBM11 ++PBM_DEFINES = -I@includedir@/netpbm -DNETPBM11 + + ## + ## Specific xpaint options diff --git a/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch new file mode 100644 index 000000000000..cc7d70de6f3e --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.3-gentoo-qa.patch @@ -0,0 +1,41 @@ +The original Makefile did not pass CFLAGS and LDFLAGS +See bug https://bugs.gentoo.org/727632 +Also remove -O3 and stripping +--- a/vxp2ps/Makefile ++++ b/vxp2ps/Makefile +@@ -3,16 +3,16 @@ + all: vxp2ps vxp2tex vxp2dkw + + vxp2ps: vxp2ps.c +- gcc vxp2ps.c -o vxp2ps -lm $(CFLAGSEXTRA) ++ $(CC) vxp2ps.c -o vxp2ps -lm $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) + + vxp2tex: vxp2tex.c +- gcc vxp2tex.c -o vxp2tex -lm ++ $(CC) vxp2tex.c -o vxp2tex -lm $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) + + vxp2dkw: vxp2dkw.c +- gcc vxp2dkw.c -o vxp2dkw -lm ++ $(CC) vxp2dkw.c -o vxp2dkw -lm $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) + + install: all +- install -c -s vxp2ps vxp2tex vxp2dkw "$(DESTDIR)"/usr/bin ++ install -c vxp2ps vxp2tex vxp2dkw "$(DESTDIR)$(BINDIR)" + + clean: + rm -f core *~ vxp2ps vxp2tex vxp2dkw +--- a/util/Makefile ++++ b/util/Makefile +@@ -10,10 +10,10 @@ + endif + + pdfconcat: +- $(CC) $(CFLAGS) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat + + ppmtops: +- $(CC) $(CFLAGS) ppmtops.c -o ppmtops ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ppmtops.c -o ppmtops + + ifneq ($(WITH_PGF),no) + pgf2pnm: main.cpp pnm.cpp diff --git a/media-gfx/xpaint/files/xpaint-3.1.3-libtool-clang.patch b/media-gfx/xpaint/files/xpaint-3.1.3-libtool-clang.patch new file mode 100644 index 000000000000..9aef70c8a9a1 --- /dev/null +++ b/media-gfx/xpaint/files/xpaint-3.1.3-libtool-clang.patch @@ -0,0 +1,51 @@ +libtool doesn't work if compiling with clang. Need to add --tag=CC +Don't hardcode /usr/bin/libtool in gentoo prefix +See bug https://bugs.gentoo.org/731010 + +rdlibtool needs to find system libtool in current directory +See bug https://bugs.gentoo.org/778791 +--- a/configure.ac ++++ b/configure.ac +@@ -17,6 +17,10 @@ + AC_LANG_C + AM_PROG_AR + ++dnl libtool ++LT_INIT ++AC_SUBST([LIBTOOL_DEPS]) ++ + ## basic types + + AC_TYPE_INT8_T +--- a/xpaintrw/Makefile.am ++++ b/xpaintrw/Makefile.am +@@ -28,7 +28,8 @@ + + xpaint_DEFINES = $(ARCH_DEFINES) $(EXTRA_DEFINES) $(XAWLIB_DEFINES) + +-LIBTOOL = /usr/bin/libtool ++LIBTOOL = ../libtool ++AM_LIBTOOLFLAGS = --tag=CC + AM_CFLAGS = @X_CFLAGS@ @SPECIAL_CFLAGS@ $(xpaint_DEFINES) + AM_YFLAGS = -d + CLEANFILES = +--- a/Makefile.am ++++ b/Makefile.am +@@ -53,12 +53,16 @@ + dist_man_MANS = xpaint.1 imgmerge.1 + AM_CFLAGS = @X_CFLAGS@ @SPECIAL_CFLAGS@ $(xpaint_DEFINES) + ACLOCAL_AMFLAGS = -I m4 +-BUILT_SOURCES = version.h DefaultRC.txt.h messages.h XPaint.ad.h xpaint.1 ++BUILT_SOURCES = version.h DefaultRC.txt.h messages.h XPaint.ad.h xpaint.1 libtool + AM_YFLAGS = -d + CLEANFILES = preproc substads \ + version.h DefaultRC.txt.h messages.h XPaint.ad.h xpaint.1 + EXTRA_DIST = + ++LIBTOOL_DEPS = @LIBTOOL_DEPS@ ++libtool: ++ $(SHELL) ./config.status libtool ++ + BASE_HDRS = bitmap.h color.h crc32.h \ + Colormap.h ColormapP.h graphic.h hash.h image.h \ + menu.h messages.h misc.h operation.h ops.h \ |