aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/jx/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'x11-toolkits/jx/Makefile')
-rw-r--r--x11-toolkits/jx/Makefile235
1 files changed, 235 insertions, 0 deletions
diff --git a/x11-toolkits/jx/Makefile b/x11-toolkits/jx/Makefile
new file mode 100644
index 000000000000..63c9ccac9f8b
--- /dev/null
+++ b/x11-toolkits/jx/Makefile
@@ -0,0 +1,235 @@
+# New ports collection makefile for: JX
+# Date created: 30 July 1999
+# Whom: Davec <davec@unforgettable.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= JX
+PORTVERSION= 1.5.3
+CATEGORIES= x11-toolkits
+MASTER_SITES= ftp://ftp.newplanetsoftware.com/pub/jx/source-1.5.3/ \
+ ftp://ftp.newplanetsoftware.com/pub/jcc/source/ \
+ ftp://ftp.newplanetsoftware.com/pub/medic/source/ \
+ ftp://ftp.cs.itu.edu.tr/pub/linux/x11/jx/
+DISTNAME= ${PORTNAME}_source-${PORTVERSION}
+
+MAINTAINER= lioux@linf.unb.br
+
+LIB_DEPENDS= png.3:${PORTSDIR}/graphics/png \
+ Xpm.4:${PORTSDIR}/graphics/xpm
+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+USE_XLIB= yes
+USE_BISON= yes
+USE_GMAKE= yes
+MAKE_ENV+= JX_INSTALL_ROOT="${PREFIX}/bin" \
+ JX_LIB_ROOT="${PREFIX}/lib" \
+ X11PREFIX="${X11PREFIX}" \
+ PATH="${WRKSRC}/programs/makemake:${PATH}" \
+ PORTCFLAGS="${CFLAGS}" \
+ PORTCXXFLAGS="${CXXFLAGS}" \
+ CC="${CC}" CXX="${CXX}"
+MAKE_ARGS+= -e
+PLIST_SUB= LIBACE="${LIBACE}" \
+ LIBJTOOL="${LIBJTOOL}" \
+ LIBJX="${LIBJX}" \
+ X11PREFIX="${X11PREFIX}"
+EXTRA_PATCHES= ${WRKDIR}/patch-aa ${WRKDIR}/patch-ab
+
+X11PREFIX?= ${X11BASE}
+
+# Installs dir with proper permissions
+INSTALL_DATA_DIR= ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 755
+# the libraries
+LIBFILES= libACE-5_0_2.so \
+ libjcore-1_5_3.a libjcore-1_5_3.so \
+ libjx-1_5_3.a libjx-1_5_3.so
+# bin program files
+PROGRAMFILES= lib/util/autodoc/autodoc programs/makemake/makemake
+PROGRAMFILES_SCRIPT= makemake/makecheck makemake/maketouch
+# x11 program files
+X11R6FILES= jxlayout/jxlayout
+X11R6FILES_SCRIPT= jxlayout/jfdesign
+# header files
+INCLUDEDIR= jcore jx
+INCLUDEDIR_ACE_WRKSRC= ACE/ACE_wrappers/ace
+INCLUDEDIR_ACE_DIR= . CLASSIX
+# documentation
+DOCDIR_PREFIX= ${PREFIX}/share/doc/JX
+DOCFILES= README FAQ LICENSE CHANGES
+DOCDIRS= ACE jxlayout makemake
+DOCDIRFILES= LICENSE README
+# examples
+EXAMPLEDIRS= tutorial
+EXAMPLEDIR_PREFIX= ${PREFIX}/share/examples/JX
+# xpm images
+ICONDIRS= libjx/menu_image
+ICONDIR_PREFIX= ${PREFIX}/share/jx
+# additional configuration and header files
+EXTRALIB_PREFIX= ${PREFIX}/lib/jx
+EXTRALIBDIRS= jxlayout lib make
+EXTRALIBFILES_JXLAYOUT= class_map need_font_list option_map
+EXTRALIBFILES_MAKE_WRKSRC= include/make
+EXTRALIBFILES_MAKE_DIR= . sys
+# odd behavior
+POSTBUILD_WRKSRC= makemake jxlayout
+# post patch preprocessing
+POSTPATCH_PREPROCESS_FILES= patch-aa patch-ab
+# post patch garbage colletion
+POSTPATCH_CLEAN_WRKSRC= include/make include/make/sys
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 300000
+ALL_TARGET= freebsd3.x
+LIBACE= 5
+LIBJTOOL= 0
+LIBJX= 1
+.else
+ALL_TARGET= freebsd2.x
+LIBACE= 5.0
+LIBJTOOL= 0.5
+LIBJX= 1.5
+.endif
+
+.if defined(NOPORTDOCS)
+PLIST_SUB+= PORTDOCS:="@comment "
+.else
+PLIST_SUB+= PORTDOCS:=
+.endif # !defined(NOPORTDOCS)
+
+pre-patch:
+.for i in ${POSTPATCH_PREPROCESS_FILES}
+ @${SED} "s!X11PREFIX!${X11PREFIX}!g" ${FILESDIR}/${i} > ${WRKDIR}/${i}
+.endfor
+
+post-patch:
+.for i in ${POSTPATCH_CLEAN_WRKSRC}
+ @cd ${WRKSRC}/${i} ; ${RM} *.orig
+.endfor
+
+# odd behavior
+post-build:
+.for i in ${POSTBUILD_WRKSRC}
+ @cd ${WRKSRC}/programs/${i}; ${SETENV} ${MAKE_ENV} ${GMAKE}
+.endfor
+
+do-install:
+.if !defined(NOPORTDOCS)
+# Install all documentation
+ @${INSTALL_DATA_DIR} ${DOCDIR_PREFIX}
+.for i in ${DOCFILES}
+ @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCDIR_PREFIX}
+.endfor
+.for i in ${DOCDIRS}
+ @for j in ${DOCDIRFILES} ; \
+ do \
+ if [ -f ${WRKSRC}/programs/${i}/$${j} ]; \
+ then \
+ ${INSTALL_DATA} ${WRKSRC}/programs/${i}/$${j} \
+ ${DOCDIR_PREFIX}/$${j}_${i} ; \
+ elif [ -f ${WRKSRC}/${i}/$${j} ]; \
+ then \
+ ${INSTALL_DATA} ${WRKSRC}/${i}/$${j} \
+ ${DOCDIR_PREFIX}/$${j}_${i} ; \
+ fi ; \
+ done
+.endfor
+ @${INSTALL_DATA} ${WRKSRC}/doc/* ${DOCDIR_PREFIX}
+ @${INSTALL_DATA} ${WRKSRC}/ACE/ACE_wrappers/VERSION \
+ ${DOCDIR_PREFIX}/ACE_VERSION
+# Install all examples
+.for i in ${EXAMPLEDIRS}
+ @${INSTALL_DATA_DIR} ${EXAMPLEDIR_PREFIX}/${i} ; \
+ cd ${WRKSRC}/${i}; \
+ for j in * ; \
+ do \
+ if [ -f $${j} ]; \
+ then \
+ ${INSTALL_DATA} $${j} ${EXAMPLEDIR_PREFIX}/${i} ; \
+ elif [ -d $${j} ]; \
+ then \
+ ${INSTALL_DATA_DIR} ${EXAMPLEDIR_PREFIX}/${i}/$${j} ; \
+ for k in $${j}/* ; \
+ do \
+ ${INSTALL_DATA} $${k} ${EXAMPLEDIR_PREFIX}/${i}/$${j} ; \
+ done; \
+ fi; \
+ done
+.endfor
+.endif # !defined(NOPORTDOCS)
+# Install all icons
+.for i in ${ICONDIRS}
+ @${INSTALL_DATA_DIR} ${ICONDIR_PREFIX} ; \
+ for j in ${WRKSRC}/${i}/*.xpm ; \
+ do \
+ ${INSTALL_DATA} $${j} ${ICONDIR_PREFIX} ; \
+ done
+.endfor
+# Install all header files
+.for i in ${INCLUDEDIR}
+ @${INSTALL_DATA_DIR} ${PREFIX}/include/${i} ; \
+ for j in ${WRKSRC}/include/${i}/*.h ; \
+ do \
+ ${INSTALL_DATA} $${j} ${PREFIX}/include/${i} ; \
+ done
+.endfor
+.for i in ${INCLUDEDIR_ACE_DIR}
+ @${INSTALL_DATA_DIR} ${PREFIX}/include/ace/${i}
+ @${INSTALL_DATA} ${WRKSRC}/${INCLUDEDIR_ACE_WRKSRC}/${i}/*.cpp \
+ ${PREFIX}/include/ace/${i}/
+ @${INSTALL_DATA} ${WRKSRC}/${INCLUDEDIR_ACE_WRKSRC}/${i}/*.h \
+ ${PREFIX}/include/ace/${i}/
+ @${INSTALL_DATA} ${WRKSRC}/${INCLUDEDIR_ACE_WRKSRC}/${i}/*.i \
+ ${PREFIX}/include/ace/${i}/
+.endfor
+# Install all libraries
+.for i in ${LIBFILES}
+ @${INSTALL_PROGRAM} ${WRKSRC}/lib/${i} ${PREFIX}/lib
+.endfor
+# Install additional library files
+.for i in ${EXTRALIBDIRS}
+ @${INSTALL_DATA_DIR} ${EXTRALIB_PREFIX}/${i}
+.endfor
+.for i in ${EXTRALIBFILES_JXLAYOUT}
+ @${INSTALL_DATA} ${WRKSRC}/programs/jxlayout/${i} \
+ ${EXTRALIB_PREFIX}/jxlayout
+.endfor
+.for i in ${EXTRALIBFILES_MAKE_DIR}
+ @${INSTALL_DATA_DIR} ${EXTRALIB_PREFIX}/make/${i} ; \
+ for j in ${WRKSRC}/${EXTRALIBFILES_MAKE_WRKSRC}/${i}/* ; \
+ do \
+ if [ -f $${j} ]; \
+ then \
+ ${INSTALL_DATA} $${j} ${EXTRALIB_PREFIX}/make/${i}/ ; \
+ fi; \
+ done
+.endfor
+# Install all programs
+.for i in ${PROGRAMFILES}
+ @${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/bin
+.endfor
+.for i in ${PROGRAMFILES_SCRIPT}
+ @${INSTALL_SCRIPT} ${WRKSRC}/programs/${i} ${PREFIX}/bin
+.endfor
+.for i in ${X11R6FILES}
+ @${INSTALL_PROGRAM} ${WRKSRC}/programs/${i} ${X11PREFIX}/bin
+.endfor
+.for i in ${X11R6FILES_SCRIPT}
+ @${INSTALL_SCRIPT} ${WRKSRC}/programs/${i} ${X11PREFIX}/bin
+.endfor
+
+post-install:
+ @${LN} -sf libACE-5_0_2.so \
+ ${PREFIX}/lib/libACE-5_0_2.so.${LIBACE}
+ @${LN} -sf libjcore-1_5_3.so \
+ ${PREFIX}/lib/libjcore-1_5_3.so.${LIBJX}
+ @${LN} -sf libjx-1_5_3.so \
+ ${PREFIX}/lib/libjx-1_5_3.so.${LIBJX}
+.for i in ${LIBFILES}
+ @${LN} -sf ../../${i} ${EXTRALIB_PREFIX}/lib/${i}
+.endfor
+
+.include <bsd.port.post.mk>