Trinity Desktop Environment Packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

trinity.port.mk 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ### General information
  2. TDE_VERSION= 14.0.0
  3. TDE_PREFIX= /opt/trinity
  4. HOMEPAGE= http://www.trinitydesktop.org/
  5. MAINTAINER= François Andriot <francois.andriot@free.fr>
  6. PERMIT_PACKAGE_CDROM= Yes
  7. PERMIT_PACKAGE_FTP= Yes
  8. FLAVORS=debug
  9. FLAVOR?=
  10. ### General build options
  11. PKG_CONFIG_PATH=/opt/trinity/lib/pkgconfig:/usr/X11R6/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
  12. BUILD_DEPENDS= devel/gmake \
  13. devel/cmake \
  14. textproc/gsed \
  15. shells/bash
  16. ### CMAKE related build options
  17. CMAKE_INCLUDE_PATH=/usr/include:/usr/local/include:/usr/X11R6/include
  18. CMAKE_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/X11R6/lib
  19. # Build Flags
  20. TDE_FLAGS=${CXXFLAGS} \
  21. -I${WRKDIST}/libltdl -I/usr/X11R6/include -I/usr/local/include \
  22. -L/usr/X11R6/lib -L/usr/local/lib \
  23. -Wl,-lc -pthread
  24. .if ${FLAVOR:Mdebug}
  25. CMAKE_BUILD_TYPE=Debug
  26. TDE_FLAGS+= -g
  27. .else
  28. CMAKE_BUILD_TYPE=RelWithDebInfo
  29. TDE_FLAGS+= -DNDEBUG
  30. .endif
  31. # Custom configure commands
  32. TDE_BUILD_ENV=\
  33. export TDEDIR="${TDE_PREFIX}"; \
  34. export PATH="${TDE_PREFIX}/bin:${PATH}"; \
  35. export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}"; \
  36. export CFLAGS="${TDE_FLAGS}"; \
  37. export CXXFLAGS="${TDE_FLAGS} -Wl,-lstdc++";
  38. TDE_CMAKE_CONFIGURE=\
  39. ${TDE_BUILD_ENV} \
  40. export CMAKE_INCLUDE_PATH="${CMAKE_INCLUDE_PATH}"; \
  41. export CMAKE_LIBRARY_PATH="${CMAKE_LIBRARY_PATH}"; \
  42. cd ${WRKDIST} && mkdir build && cd build && cmake .. \
  43. -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
  44. -DCMAKE_C_FLAGS="${TDE_FLAGS}" \
  45. -DCMAKE_CXX_FLAGS="${TDE_FLAGS} -Wl,-lstdc++" \
  46. -DCMAKE_SKIP_RPATH=OFF \
  47. -DCMAKE_INSTALL_RPATH="${TDE_PREFIX}/lib" \
  48. -DCMAKE_VERBOSE_MAKEFILE=ON \
  49. -DCMAKE_EXTRA_INCLUDE_FILES="pthread.h" \
  50. \
  51. -DTDEDIR="${TDE_PREFIX}" \
  52. -DCMAKE_INSTALL_PREFIX="${TDE_PREFIX}" \
  53. -DBIN_INSTALL_DIR="${TDE_PREFIX}/bin" \
  54. -DSHARE_INSTALL_PREFIX="${TDE_PREFIX}/share" \
  55. -DDOC_INSTALL_DIR="${TDE_PREFIX}/share/doc" \
  56. -DINCLUDE_INSTALL_DIR="${TDE_PREFIX}/include/tde" \
  57. -DLIB_INSTALL_DIR="${TDE_PREFIX}/lib" \
  58. -DPLUGIN_INSTALL_DIR="${TDE_PREFIX}/lib/trinity" \
  59. -DPKGCONFIG_INSTALL_DIR="${TDE_PREFIX}/lib/pkgconfig"
  60. TDE_AUTOTOOLS_CONFIGURE=\
  61. ${TDE_BUILD_ENV} \
  62. cd ${WRKDIST} && ./configure \
  63. --prefix=${TDE_PREFIX} \
  64. --exec-prefix=${TDE_PREFIX} \
  65. --bindir=${TDE_PREFIX}/bin \
  66. --libdir=${TDE_PREFIX}/lib \
  67. --includedir=${TDE_PREFIX}/include \
  68. --datadir=${TDE_PREFIX}/share \
  69. \
  70. --enable-shared \
  71. --disable-static \
  72. --disable-dependency-tracking \
  73. --disable-debug \
  74. --enable-final \
  75. --enable-new-ldflags \
  76. --enable-closure \
  77. --enable-rpath \
  78. --disable-gcc-hidden-visibility \
  79. ### Custom build targets for CMAKE
  80. tde-cmake-rmbuild:
  81. rm -rf "${WRKDIST}/build"
  82. tde-cmake-build:
  83. ${TDE_BUILD_ENV} \
  84. cd "${WRKDIST}/build" && gmake ${MAKE_FLAGS} || gmake
  85. tde-cmake-install:
  86. ${TDE_BUILD_ENV} \
  87. cd "${WRKDIST}/build" && gmake install
  88. ### Custom build targets for AUTOTOOLS
  89. tde-autotools-prepare:
  90. cp -f "/usr/local/share/aclocal/libtool.m4" "${WRKDIST}/admin/libtool.m4.in"
  91. cp "/usr/local/share/libtool/config/ltmain.sh" "${WRKDIST}/admin/ltmain.sh"
  92. gsed -i "${WRKDIST}/admin/acinclude.m4.in" -e "s|/usr/include/tqt|${LOCALBASE}/include/tqt|g"
  93. cd "${WRKDIST}" && gmake -f "admin/Makefile.common"
  94. tde-autotools-build:
  95. ${TDE_BUILD_ENV} \
  96. cd "${WRKDIST}" && gmake ${MAKE_FLAGS} || gmake
  97. tde-autotools-install:
  98. ${TDE_BUILD_ENV} \
  99. cd "${WRKDIST}" && gmake install