### General information TDE_VERSION?= 14.0.1 TDE_PREFIX= /opt/trinity PREFIX= ${TDE_PREFIX} HOMEPAGE= http://www.trinitydesktop.org/ MAINTAINER?= slavek.banko@axis.cz MASTER_SITE_TDE?= http://mirror.xcer.cz/trinity-sb/pool/main-r14/%SUBDIR%/ \ http://ppa.quickbuild.pearsoncomputing.net/slavek-banko/main-r14/ubuntu/pool/main/%SUBDIR%/ MASTER_SITE_TDE_DEPS?= http://mirror.xcer.cz/trinity-sb/pool/deps-r14/%SUBDIR%/ \ http://ppa.quickbuild.pearsoncomputing.net/slavek-banko/deps-r14/ubuntu/pool/main/%SUBDIR%/ MASTER_SITES= ${MASTER_SITE_TDE} PORTVERSION= ${TDE_VERSION}${TDE_PREVERSION:C/~(pre|r|s)([0-9]*).*/.p\2/1} DISTNAME= ${PORTNAME}_${TDE_VERSION}${TDE_PREVERSION:C/(~(pre|r|s)[0-9]*).*/\1/1} DISTSRC= ${PORTNAME}-${TDE_VERSION}${TDE_PREVERSION} EXTRACT_CMD= gtar EXTRACT_SUFX= .orig.tar.xz .if ${MASTER_SITES:M*nightly-builds*} EXTRACT_BASE= # tarballs from nightly-builds not contains directory by name of package .else EXTRACT_BASE= ${DISTSRC}/ .endif EXTRACT_AFTER_ARGS+=--transform "s|^\(${DISTSRC}\)\?|${DISTNAME}/|S" --wildcards ### General build options TDE_DEBUG?= 0 .MAKEFLAGS= # Reset makeflags to avoid -B supplied from bsd.port.subdir.mk PKG_CONFIG_PATH=/opt/trinity/lib/pkgconfig:/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig EXTRACT_DEPENDS=\ gtar:${PORTSDIR}/archivers/gtar \ BUILD_DEPENDS=\ automake:${PORTSDIR}/devel/automake \ libtool:${PORTSDIR}/devel/libtool \ cmake:${PORTSDIR}/devel/cmake \ gfind:${PORTSDIR}/misc/findutils \ gsed:${PORTSDIR}/textproc/gsed \ bash:${PORTSDIR}/shells/bash \ USES+= gmake PATCH_STRIP= -p1 TDE_BUILD_SUBDIR=.build # Set to empty for build-in-source # Build Flags TDE_FLAGS=-I${LOCALBASE}/include TDE_LDFLAGS=-L${LOCALBASE}/lib .if ${TDE_DEBUG} TDE_FLAGS+= -g CMAKE_BUILD_TYPE=Debug .else TDE_FLAGS+= -DNDEBUG CMAKE_BUILD_TYPE=RelWithDebInfo .endif CMAKE_BUILD_TYPE_U=`echo ${CMAKE_BUILD_TYPE} | tr [:lower:] [:upper:]` # Custom configure commands TDE_BUILD_ENV=\ TDEDIR="${TDE_PREFIX}" \ PATH="${TDE_PREFIX}/bin:${PATH}" \ PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" \ CFLAGS="${CFLAGS} ${TDE_FLAGS}" \ CXXFLAGS="${CXXFLAGS} ${TDE_FLAGS}" \ LDFLAGS="${LDFLAGS} ${TDE_LDFLAGS}" TDE_CMAKE_CONFIGURE=\ export ${TDE_BUILD_ENV}; \ export CMAKE_PREFIX_PATH="${LOCALBASE}"; \ [ -z "${TDE_BUILD_SUBDIR}" ] || mkdir ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ cd ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ cmake ${WRKSRC} \ -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \ -DCMAKE_C_FLAGS="${TDE_FLAGS}" \ -DCMAKE_CXX_FLAGS="${TDE_FLAGS}" \ -DCMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_U}="${TDE_LDFLAGS}" \ -DCMAKE_MODULE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_U}="${TDE_LDFLAGS}" \ -DCMAKE_SHARED_LINKER_FLAGS_${CMAKE_BUILD_TYPE_U}="${TDE_LDFLAGS}" \ \ -DCMAKE_INSTALL_PREFIX="${TDE_PREFIX}" \ -DCMAKE_INSTALL_RPATH="${TDE_PREFIX}/lib" \ -DCMAKE_SKIP_RPATH=OFF \ -DCMAKE_VERBOSE_MAKEFILE=ON \ TDE_AUTOTOOLS_CONFIGURE=\ export ${TDE_BUILD_ENV}; \ [ -z "${TDE_BUILD_SUBDIR}" ] || mkdir ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ cd ${WRKSRC}/${TDE_BUILD_SUBDIR} && \ ${WRKSRC}/configure \ --prefix=${TDE_PREFIX} \ --exec-prefix=${TDE_PREFIX} \ --bindir=${TDE_PREFIX}/bin \ --libdir=${TDE_PREFIX}/lib \ --includedir=${TDE_PREFIX}/include \ --datadir=${TDE_PREFIX}/share \ \ --enable-shared \ --disable-static \ --disable-dependency-tracking \ --enable-final \ --enable-new-ldflags \ --enable-closure \ --enable-rpath \ .if ${TDE_DEBUG} TDE_AUTOTOOLS_CONFIGURE+=--enable-debug .else TDE_AUTOTOOLS_CONFIGURE+=--disable-debug .endif ### Custom build targets tde-pathfix: cd ${WRKSRC}; \ [ -d admin ] && \ gsed -i admin/am_edit \ admin/debianrules \ admin/nmcheck \ -e "s|/usr/bin/perl|${LOCALBASE}/bin/perl|"; \ [ -d cmake ] && \ gsed -i cmake/install_apidox \ cmake/generate_apidox \ -e "s|/bin/bash|${LOCALBASE}/bin/bash|g"; \ gfind -name "*.pl" | xargs -r \ gsed -i -e "s|/usr/bin/perl|${LOCALBASE}/bin/perl|" ### Custom build targets for CMAKE tde-cmake-prepare: [ -z "${TDE_BUILD_SUBDIR}" ] || rm -rf "${WRKSRC}/${TDE_BUILD_SUBDIR}" tde-cmake-build: ${TDE_BUILD_ENV} \ ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" tde-cmake-install: ${TDE_BUILD_ENV} \ DESTDIR=${STAGEDIR} \ ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" install ### Custom build targets for AUTOTOOLS tde-autotools-prepare: [ -z "${TDE_BUILD_SUBDIR}" ] || rm -rf "${WRKSRC}/${TDE_BUILD_SUBDIR}" cp -f "/usr/local/share/aclocal/libtool.m4" "${WRKSRC}/admin/libtool.m4.in" cp -f "/usr/local/share/libtool/build-aux/ltmain.sh" "${WRKSRC}/admin/ltmain.sh" gsed -i "${WRKSRC}/admin/acinclude.m4.in" -e "s|/usr/include/tqt|${LOCALBASE}/include/tqt|g" ${MAKE_CMD} -C "${WRKSRC}" -f "admin/Makefile.common" tde-autotools-build: ${TDE_BUILD_ENV} \ ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" tde-autotools-install: ${TDE_BUILD_ENV} \ DESTDIR=${STAGEDIR} \ ${MAKE_CMD} -C "${WRKSRC}/${TDE_BUILD_SUBDIR}" install