From 0ebb29063810fac1c98ee9d819bf5df9ce09fdda Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Mon, 9 Feb 2015 08:50:02 +0000 Subject: - Fix the breakage caused by previous commit (r378707): restore sane order of knobs; resurrect documentation/Makefile patch; bring back recalculation of ${ETCDIR} length in Fl_Preferences.cxx, trim CONFIGURE_ARGS (again), etc. - Restore correct LDFLAGS+= -L../src (previously -L${WRKSRC}/src), otherwise the build fails with e.g. previous version of FLTK libraries installed - Take maintainership to prevent Kato's monkeys jeopardizing it all over again - Install code examples as PORTEXAMPLES (we do not install any documentation because it requires LaTeX stack to build) - Since `post-patch' target is a bit too verbose now, make it .SILENT - Do not compile things with -Os by default (already honors user's CXXFLAGS) - Do not blindly strip libraries and fluid(1) binary (respect ${STRIP} value) --- x11-toolkits/fltk/Makefile | 57 ++++++++++------------ x11-toolkits/fltk/files/patch-configure | 18 +++++++ .../fltk/files/patch-documentation_Makefile | 23 +++++++++ 3 files changed, 66 insertions(+), 32 deletions(-) create mode 100644 x11-toolkits/fltk/files/patch-documentation_Makefile (limited to 'x11-toolkits/fltk') diff --git a/x11-toolkits/fltk/Makefile b/x11-toolkits/fltk/Makefile index 20284e7d616c..268a001cc120 100644 --- a/x11-toolkits/fltk/Makefile +++ b/x11-toolkits/fltk/Makefile @@ -3,50 +3,43 @@ PORTNAME= fltk PORTVERSION= 1.3.3 -DISTVERSIONSUFFIX= -source +PORTREVISION= 1 CATEGORIES= x11-toolkits -MASTER_SITES= http://fltk.org/pub/%SUBDIR%/ -MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTVERSION} +MASTER_SITES= http://fltk.org/pub/${PORTNAME}/${PORTVERSION}/ +DISTNAME= ${PORTNAME}-${PORTVERSION}-source -MAINTAINER= ports@FreeBSD.org +MAINTAINER= danfe@FreeBSD.org COMMENT= Cross-platform C++ graphical user interface toolkit LICENSE= LGPL20 -LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \ - libpng.so:${PORTSDIR}/graphics/png - -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \ + libjpeg.so:${PORTSDIR}/graphics/jpeg USES= pkgconfig USE_XORG= xft USE_GL= glu -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-threads \ - --enable-shared \ - --enable-xft USE_LDCONFIG= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-shared + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib - -PORTDOCS= * - -OPTIONS_DEFINE= DOCS - -post-patch: - @${REINPLACE_CMD} -e \ - '/.SILENT/s|^|#| ; \ - /echo /s|^|#|' ${WRKSRC}/makeinclude.in - @${REINPLACE_CMD} -e \ - '/cat[13]/s|^|#|' ${WRKSRC}/documentation/Makefile - @${REINPLACE_CMD} -e \ - 's|"/etc/fltk/"|"${ETCDIR}/"|' ${WRKSRC}/src/Fl_Preferences.cxx - -post-install: - @(cd ${WRKSRC}/test && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ - ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install) - @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/fluid - @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libfltk*.so.[0-9]* +# -L../src is needed to be able to build new version with older one installed +LDFLAGS+= -L../src -L${LOCALBASE}/lib + +PORTEXAMPLES= * + +OPTIONS_DEFINE= EXAMPLES + +post-patch: .SILENT + prefix="${PREFIX}" ; plength=$$(($${#prefix}+10)) ; \ + ${REINPLACE_CMD} -e "\|/etc/fltk|{s||${PREFIX}&|;s|10|$${plength}|;}" \ + ${WRKSRC}/src/Fl_Preferences.cxx + ${REINPLACE_CMD} -e 's,$$(docdir)/examples,${EXAMPLESDIR},' \ + ${WRKSRC}/test/Makefile + ${REINPLACE_CMD} -E '/^INSTALL_(BIN|LIB)/s,-m,${STRIP} &, ; \ + s,^\.SILENT,#&,' ${WRKSRC}/makeinclude.in .include diff --git a/x11-toolkits/fltk/files/patch-configure b/x11-toolkits/fltk/files/patch-configure index 44897babaeb0..38502025c303 100644 --- a/x11-toolkits/fltk/files/patch-configure +++ b/x11-toolkits/fltk/files/patch-configure @@ -9,3 +9,21 @@ DSOFLAGS="$X_LIBS $DSOFLAGS" $as_echo "#define USE_X11 1" >>confdefs.h +@@ -8137,17 +8137,10 @@ + # Don't use -fforce-mem, -fforce-addr, or -fcaller-saves. + # They all seem to make either no difference or enlarge + # the code by a few hundred bytes. +- # +- # "-Os" seems to be the best compromise between speed and +- # code size. "-O3" and higher seem to make no effective +- # difference in the speed of the code, but does bloat the +- # library 10+%. + # + + if test "x$with_optim" != x; then + OPTIM="$with_optim $OPTIM" +- else +- OPTIM="-Os $OPTIM" + fi + fi + diff --git a/x11-toolkits/fltk/files/patch-documentation_Makefile b/x11-toolkits/fltk/files/patch-documentation_Makefile new file mode 100644 index 000000000000..305d1f954e6a --- /dev/null +++ b/x11-toolkits/fltk/files/patch-documentation_Makefile @@ -0,0 +1,23 @@ +--- documentation/Makefile.orig 2011-08-27 01:33:42.000000000 +0000 ++++ documentation/Makefile 2011-08-27 01:39:59.000000000 +0000 +@@ -73,7 +73,7 @@ + + install: $(MANPAGES) + echo "Installing documentation files in $(DESTDIR)$(docdir) ..." +- -$(INSTALL_DIR) $(DESTDIR)$(docdir) ++# -$(INSTALL_DIR) $(DESTDIR)$(docdir) + if test -f html/index.html ; then \ + for file in html/* ; do \ + $(INSTALL_DATA) $$file $(DESTDIR)$(docdir); \ +@@ -84,11 +84,6 @@ + $(INSTALL_DATA) fltk.pdf $(DESTDIR)$(docdir); \ + fi + echo "Installing man pages in $(DESTDIR)$(mandir) ..." +- -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat1 +- $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1 +- $(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1 +- -$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat3 +- $(INSTALL_MAN) $(SRC_DOCDIR)/fltk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3 + -$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1 + $(INSTALL_MAN) $(SRC_DOCDIR)/fluid.man $(DESTDIR)$(mandir)/man1/fluid.1 + $(INSTALL_MAN) $(SRC_DOCDIR)/fltk-config.man $(DESTDIR)$(mandir)/man1/fltk-config.1 -- cgit v1.2.3