recipe 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Build recipe for tqtinterface.
  2. #
  3. # Copyright (c) 2020-2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. program=tqtinterface
  19. version=20220503_33d1412
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=tde
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch="
  26. https://dragora.mirror.garr.it/current/sources/$tarname
  27. rsync://rsync.dragora.org/current/sources/$tarname
  28. "
  29. description="
  30. The Trinity Qt Interface.
  31. This package includes libraries that abstract the underlying Qt system
  32. from the actual Trinity code, allowing easy, complete upgrades to new
  33. versions of Qt.
  34. It also contains various functions that have been removed from newer
  35. versions of Qt, but are completely portable and isolated from other APIs
  36. such as Xorg. This allows the Trinity project to efficiently perform
  37. certain operations that are infeasible or unneccessarily difficult when
  38. using pure Qt4 or above.
  39. "
  40. homepage=https://www.trinitydesktop.org/
  41. license=GPLv2+
  42. # Source documentation
  43. docs="AUTHORS COPYING README qtinterface/TODO"
  44. docsdir="${docdir}/${program}-${version}"
  45. build()
  46. {
  47. unpack "${tardir}/$tarname"
  48. cd "$srcdir"
  49. # Set sane permissions
  50. chmod -R u+w,go-w,a+rX-s .
  51. rm -rf BUILD
  52. mkdir BUILD
  53. cd BUILD
  54. cmake \
  55. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  56. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  57. -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$QICXXFLAGS" \
  58. -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(echo $QILDFLAGS | sed 's/-s//')" \
  59. -DCMAKE_INSTALL_PREFIX=/usr \
  60. -DLIB_SUFFIX=${libSuffix} \
  61. -DCMAKE_VERBOSE_MAKEFILE=ON \
  62. -DQT_VERSION=3 \
  63. -DWITH_QT3=ON \
  64. -DWITH_QT4=OFF \
  65. -G Ninja ..
  66. ninja -j${jobs}
  67. DESTDIR="$destdir" ninja -j${jobs} install
  68. # Compress and link man pages (if needed)
  69. if test -d "${destdir}/$mandir"
  70. then
  71. (
  72. cd "${destdir}/$mandir"
  73. find . -type f -exec lzip -9 {} +
  74. find . -type l | while read -r file
  75. do
  76. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  77. rm -- "$file"
  78. done
  79. )
  80. fi
  81. cd ..
  82. # Copy documentation
  83. mkdir -p "${destdir}/$docsdir"
  84. cp -p $docs "${destdir}/$docsdir"
  85. }