PKGBUILD 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # Maintainer (arch): Kyle Keen <keenerd@gmail.com>
  2. # Maintainer: Andreas Grapentin <andreas@grapentin.org>
  3. # Contributor: André Silva <emulatorman@hyperbola.info>
  4. # Contributor: Márcio Silva <coadde@hyperbola.info>
  5. _pkgname=seamonkey
  6. pkgname=iceape
  7. epoch=1
  8. pkgver=2.49.4
  9. pkgrel=5
  10. pkgrel+=.parabola5
  11. _brandingver=2.49
  12. _brandingrel=1
  13. pkgdesc="Iceape, the libre internet suite based on SeaMonkey."
  14. arch=('x86_64')
  15. arch+=('i686' 'armv7h')
  16. license=('MPL')
  17. depends=('alsa-lib' 'dbus-glib' 'desktop-file-utils' 'gtk2' 'gtk3' 'hunspell' 'libevent' 'libnotify' 'libvpx' 'libxt' 'mime-types' 'mozilla-common' 'nss' 'sqlite' 'startup-notification' 'libpulse' 'icu')
  18. makedepends=('unzip' 'zip' 'pkg-config' 'python2' 'yasm' 'wireless_tools' 'mesa' 'autoconf2.13' 'imake' 'python3' 'gst-plugins-base')
  19. makedepends+=('mozilla-searchplugins' 'quilt')
  20. optdepends=('gst-plugins-base: vorbis decoding, ogg demuxing'
  21. 'gst-plugins-bad: aac, vp8 and opus decoding'
  22. 'gst-plugins-good: webm and mp4 demuxing'
  23. 'gst-plugins-ugly: h.264 decoding')
  24. url="https://wiki.parabola.nu/$pkgname"
  25. replaces=("$_pkgname")
  26. conflicts=("$_pkgname")
  27. source=("https://archive.mozilla.org/pub/mozilla.org/seamonkey/releases/$pkgver/source/seamonkey-$pkgver.source.tar.xz"
  28. mozconfig
  29. seamonkey-2.0-lang.patch
  30. patch-bug1435212
  31. gettid.patch
  32. no-crmf.diff)
  33. source+=(https://repo.parabola.nu/other/$pkgname/${pkgname}_$_brandingver-$_brandingrel.branding.tar.xz{,.sig}
  34. libre.patch
  35. $pkgname.desktop
  36. xulrunner-27.0-build-arm.patch)
  37. sha256sums=('c8a66774d0a3525698b559fa2c41397186f2de99c5733e35b8eafb0ae5ccc4ee'
  38. '4e55b0fbbec93e4d7f68118722fa7c61c06b55aa888c6f2923710a0b3953115b'
  39. 'ab19d10fbd6258aec37ab5e5efb12429814b2c24a1193284a48dd654311b4e2e'
  40. 'a24204acc1149f92b96feb33cdb8668f1b938ab907cbcf6fdf8306cb3939976e'
  41. '923154d052f041af15a2495ceb1f76f7c8619fd8bfc66a0bbedfeab2514adf0b'
  42. 'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb'
  43. 'c6d571ce5fcec98742cc588b56cb543489b73e7e53eeaf0a8f46910f58782ad8'
  44. 'SKIP'
  45. '5fb5ae632c8c103d8d7be123f32340881372ee1e1b29f19790d058ee8eb16eb0'
  46. '46ac418fe26937460a36a593d71c8f5cef1288c9e747cac4ec4ca92db56da45d'
  47. 'bc83b8a51c81a401da2fbe1f7cd0843248c32607d3a51119585df074d797922e')
  48. validpgpkeys=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin
  49. prepare() {
  50. cd "$_pkgname-$pkgver"
  51. cp ../mozconfig .mozconfig
  52. #patch -Np1 -i ../seamonkey-2.0-lang.patch
  53. # perform branding
  54. install -m755 -d $pkgname
  55. mv -v "$srcdir"/$pkgname-$_brandingver/{branding,extras,patches} $pkgname
  56. export QUILT_PATCHES=$pkgname/patches
  57. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  58. export QUILT_DIFF_ARGS='--no-timestamps'
  59. quilt push -av
  60. # set up a simple non-animated throbber from the icon
  61. for throbber_target_gif in suite/themes/{classic,modern}/communicator/brand/throbber{,16}-anim.png; do
  62. install -m644 $pkgname/extras/Throbber-small.gif $throbber_target_gif
  63. done
  64. for throbber_target_png in suite/themes/{classic,modern}/communicator/brand/throbber{,16}-single.png; do
  65. install -m644 $pkgname/extras/Throbber-small.png $throbber_target_png
  66. done
  67. install -m644 $pkgname/extras/preview.png suite/themes/classic
  68. # Convert svg file to png and replace seamonkey to iceape icons
  69. _bdir=$pkgname/branding
  70. brandingdir=suite/branding/nightly
  71. for i in 16 48; do
  72. rsvg-convert -w $i -h $i $_bdir/${pkgname}_icon_plain.svg \
  73. -o $brandingdir/icons/gtk/default$i.png
  74. rsvg-convert -w $i -h $i $_bdir/${pkgname}_icon_plain.svg \
  75. -o $brandingdir/icons/gtk/main-window$i.png
  76. done
  77. for i in 32 48 64; do
  78. rsvg-convert -w $i -h $i $_bdir/${pkgname}_icon_plain.svg \
  79. -o $brandingdir/content/icon$i.png
  80. done
  81. rsvg-convert -w 32 -h 32 $_bdir/${pkgname}_icon_plain.svg \
  82. -o $brandingdir/icons/gtk/default.png
  83. rsvg-convert -w 32 -h 32 $_bdir/${pkgname}_icon_plain.svg \
  84. -o $brandingdir/icons/gtk/main-window.png
  85. rsvg-convert -w 128 -h 128 $_bdir/${pkgname}_icon_plain.svg \
  86. -o $brandingdir/icons/gtk/${pkgname}.png
  87. rsvg-convert -w 200 -h 200 $_bdir/${pkgname}_icon_plain.svg \
  88. -o $brandingdir/content/logo.gif
  89. rsvg-convert -w 300 -h 280 $_bdir/${pkgname}_logo_plain.svg \
  90. -o $brandingdir/content/about.png
  91. rsvg-convert -w 1138 -h 1152 $_bdir/${pkgname}_background_plain.svg \
  92. -o $brandingdir/content/messenger-start-bg.png
  93. # Create app-icons folder for iceape*.png icons
  94. install -m755 -d $_bdir/app-icons
  95. # Icons for /usr/share/icons/hicolor
  96. for i in 16 32 48 64 128; do
  97. rsvg-convert -w $i -h $i $_bdir/${pkgname}_icon_plain.svg \
  98. -o $_bdir/app-icons/$pkgname${i}.png
  99. done
  100. patch -Np1 -i "$srcdir/libre.patch"
  101. # FS#48404
  102. #echo "ac_add_options --enable-gstreamer=1.0" >> .mozconfig
  103. # ffmpeg 4.0 patch from freebsd
  104. # https://github.com/freebsd/freebsd-ports/blob/master/www/seamonkey/files/patch-bug1435212
  105. patch -Np1 -d mozilla -i ../../patch-bug1435212
  106. # https://bugzilla.mozilla.org/show_bug.cgi?id=1533969
  107. patch -Np1 -i ../gettid.patch
  108. # Don't exit with error when some libs are missing which we have in
  109. # system.
  110. sed -i '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' suite/installer/Makefile.in
  111. # configure script misdetects the preprocessor without an optimization level
  112. sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' configure
  113. # 2.26 build fix from wgnie (blfs ch 37)
  114. sed -i 's/$(MOZ_ZLIB_CFLAGS)/& $(MOZ_PIXMAN_CFLAGS)/' config/config.mk
  115. # work around from FS#54395
  116. patch -Np1 -d mozilla -i ../../no-crmf.diff
  117. sed -i "s/'crmf',//" mozilla/security/manager/ssl/moz.build
  118. sed -i 's/^.*-lcrmf/#&/' mozilla/config/external/nss/crmf/moz.build
  119. sed -i 's/ -lcrmf"/"/' mozilla/old-configure.in.orig
  120. sed -i 's/ -lcrmf"/"/' mozilla/old-configure
  121. sed -i 's/SDK_LIBS = crmf/SDK_LIBS = /' mozilla/config/external/nss/Makefile.in
  122. if [[ $CARCH = i686 ]]; then
  123. LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
  124. fi
  125. if [[ $CARCH = arm* ]]; then
  126. echo "ac_add_options --disable-elf-hack" >> .mozconfig
  127. LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
  128. patch -p2 -d mozilla -i "${srcdir}"/xulrunner-27.0-build-arm.patch
  129. fi
  130. }
  131. build() {
  132. cd "$_pkgname-$pkgver"
  133. export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$pkgname-$pkgver"
  134. export MOZ_MAKE_FLAGS="$MAKEFLAGS"
  135. unset MAKEFLAGS
  136. unset CPPFLAGS
  137. # GCC 6
  138. CFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
  139. CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
  140. # GCC 9
  141. CXXFLAGS+=" -Wno-format-overflow"
  142. make -j1 -f client.mk build
  143. }
  144. package() {
  145. local _icu_ver
  146. _icu_ver=$(pacman -S --print-format='%v' icu)
  147. depends+=("icu>=${_icu_ver}" "icu<$((${_icu_ver%%.*} + 1))")
  148. cd "$_pkgname-$pkgver"
  149. make -j1 -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
  150. rm -rf "$pkgdir"/usr/lib/$pkgname-$pkgver/{dictionaries,hyphenation,searchplugins}
  151. ln -s /usr/share/hunspell "$pkgdir/usr/lib/$pkgname-$pkgver/dictionaries"
  152. ln -s /usr/share/hyphen "$pkgdir/usr/lib/$pkgname-$pkgver/hyphenation"
  153. ln -s /usr/lib/mozilla/searchplugins "$pkgdir/usr/lib/$pkgname-$pkgver/searchplugins"
  154. install -Dm644 suite/branding/nightly/icons/gtk/iceape.png \
  155. "$pkgdir/usr/share/pixmaps/seamonkey.png"
  156. install -Dm644 "$srcdir/$pkgname.desktop" \
  157. "$pkgdir/usr/share/applications/$pkgname.desktop"
  158. for i in 16 32 48 64 128; do
  159. install -Dm644 $pkgname/branding/app-icons/$pkgname$i.png \
  160. "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png"
  161. done
  162. install -Dm644 $pkgname/branding/${pkgname}_icon_plain.svg \
  163. "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
  164. rm -f "$pkgdir/usr/lib/pkgconfig/"$pkgname-ns{s,pr}.pc
  165. #rm -r "$pkgdir"/usr/{include,lib/$pkgname-devel-$pkgver,share/idl}
  166. }