1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/x11-toolkits/fltk/Makefile
Alexey Dokuchaev f805256365 - Since version 1.3.3, FLTK now checks for compiler support of -fvisibility
and -fvisibility-inlines-hidden and uses it if available to reduce shared
  library size.  Unfortunately, this hides Fl_XFont_On_Demand::value, which
  in turn causes undefined reference errors during linking.  Fix by marking
  Fl_XFont_On_Demand class as FL_EXPORT for the time being (Gentoo Linux is
  doing the same)
- Do not strip libraries for now: FLTK uses the same command for installing
  both dynamic and static libraries, but "fltk-config(1) --compile" prefers
  static, which breaks programs like `graphics/iccexamin' (threading test)
- Pull another patch from Gentoo to fix segmentation fault in vncview(1) of
  port `net/tigervnc' (Gentoo bug #529856 by Maxim Britov)
- Do not leak non-existent (build-time only) -Lfoo references in LDFLAGS as
  it can potentially lead to various sporadic bugs in programs which obtain
  these flags through fltk-config(1).  To prevent build-time conflicts that
  this gimmick was originally used for, we change shared linking command of
  fluid(1) accordingly

Since these are one-line changes likely to be merged upstream sooner rather
than later, perform them with sed(1) instead of trivial patches.

Reported and reviewed by:	antoine
2015-02-10 19:29:46 +00:00

52 lines
1.4 KiB
Makefile

# Created by: Dima Sivachenko <dima@Chg.RU>
# $FreeBSD$
PORTNAME= fltk
PORTVERSION= 1.3.3
PORTREVISION= 2
CATEGORIES= x11-toolkits
MASTER_SITES= http://fltk.org/pub/${PORTNAME}/${PORTVERSION}/
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
MAINTAINER= danfe@FreeBSD.org
COMMENT= Cross-platform C++ graphical user interface toolkit
LICENSE= LGPL20
LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png \
libjpeg.so:${PORTSDIR}/graphics/jpeg
USES= pkgconfig
USE_XORG= xft
USE_GL= glu
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -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/s,-m,${STRIP} &, ; \
s,^\.SILENT,#&,' ${WRKSRC}/makeinclude.in
${REINPLACE_CMD} -E \
's,(.*)LDFLAGS(.*)LINKSHARED(.*),\1LINKSHARED\2LDFLAGS\3,' \
${WRKSRC}/fluid/Makefile
${REINPLACE_CMD} -e '/Fl_XFont_On_Demand/s,class,& FL_EXPORT,' \
${WRKSRC}/FL/x.H
${REINPLACE_CMD} -e 's,result = 0;,fl_open_display(); &,' \
${WRKSRC}/src/Fl_x.cxx
.include <bsd.port.mk>