Date: Friday, April 6, 2018 @ 23:35:31
  Author: bgyorgy
Revision: 314609

upgpkg: bluegriffon 3.1-1

Update to new version, build again from sources

Added:
  bluegriffon/trunk/mozconfig
  bluegriffon/trunk/no-crmf.diff
Modified:
  bluegriffon/trunk/PKGBUILD

--------------+
 PKGBUILD     |  178 +++++++++++++++++++++++++++++++++++++++------------------
 mozconfig    |   31 +++++++++
 no-crmf.diff |   15 ++++
 3 files changed, 170 insertions(+), 54 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-04-06 21:45:15 UTC (rev 314608)
+++ PKGBUILD    2018-04-06 23:35:31 UTC (rev 314609)
@@ -2,72 +2,142 @@
 # Maintainer: Muflone http://www.muflone.com/contacts/english/
 # Contributor: Balló György <ballogyor+arch at gmail dot com>
 
-pkgname=bluegriffon
-pkgver=3.0.1
+pkgbase=bluegriffon
+pkgname=(bluegriffon)
+pkgver=3.1
+_gecko_dev_revision=042b84a # see config/gecko_dev_revision.txt
 pkgrel=1
 pkgdesc="The next-generation Web Editor based on the rendering engine of 
Firefox"
 arch=('x86_64')
 url="http://bluegriffon.org/";
 license=('MPL' 'GPL' 'LGPL')
-depends=('nss' 'dbus-glib' 'gtk2' 'gtk3' 'hunspell' 'hyphen' 'libxt')
-optdepends=('bluegriffon-i18n: language packs for Bluegriffon')
-groups=('bluegriffon')
-source=("http://bluegriffon.org/freshmeat/${pkgver}/${pkgname}-${pkgver}.Ubuntu16.04-${CARCH}.tar.bz2";
-        
"icon-16.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/default16.png";
-        
"icon-22.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/default22.png";
-        
"icon-24.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/default24.png";
-        
"icon-32.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/default32.png";
-        
"icon-48.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/default48.png";
-        
"icon-128.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/mozicon128.png";
-        
"icon-256.png"::"https://github.com/therealglazou/${pkgname}/raw/${pkgver}/branding/default256.png";
-        "${pkgname}.desktop")
-sha256sums=('eafd38c1f1fbec2a50cf7e3904246505704dfa0fe93beaf33f6984018d3b5243'
-            '339b371abc23894084a8de27925ba688f760ab6b3b42b7a54ba338b1e8025793'
-            '2fcbe4e9631c749f290e4b3c3b177ad463c5dbdf992674499aeb5adbfeb8862a'
-            '497e5bde0da375b8a9a2d5f12d008e73d6b1758e712c70432661410b3bc6273c'
-            'c03d6e093d43c0bd6b8f25ac77ffae31d2306817b58c074971470186fe998f5a'
-            '0ea31be427b462612fde24f852bf6049a2db452320c066c93cfd73ea53524395'
-            '146b2e3979949e97e8d092a41275c27a895d11eff995eb6a453c6d79a6760480'
-            '8b19d0a8818b1a01dee68dfbda62f192c47ee9dcfd51d90f93c82fb64b40f4d0'
-            '882133b77840356985a81e496b4ddc443f8f33c068cfb7ef0858497820adcfff')
+depends=('dbus-glib' 'gtk3' 'hunspell' 'mozilla-common' 'nss' 'libvpx' 'libxt' 
'startup-notification')
+makedepends=('autoconf2.13' 'gtk2' 'libpulse' 'python2' 'rust' 'unzip' 'yasm' 
'zip')
+options=('!emptydirs')
+source=("${pkgbase}-${pkgver}.tar.gz"::"https://github.com/therealglazou/${pkgbase}/archive/${pkgver}.tar.gz";
+        
"gecko-dev-${_gecko_dev_revision}.tar.gz"::"https://github.com/mozilla/gecko-dev/archive/${_gecko_dev_revision}.tar.gz";
+        "mozconfig"
+        "${pkgbase}.desktop"
+        
"bug_1353650_icu59.patch"::"https://hg.mozilla.org/integration/mozilla-inbound/raw-rev/605d00e70409";
+        
"bug_1384062_systemresourcemonitor.patch"::"https://hg.mozilla.org/mozilla-central/raw-rev/8d9ae8c45dd0";
+        
"bug_1427455-unused-variables.patch"::"https://hg.mozilla.org/mozilla-central/raw-rev/8e28a66b548b";
+        
"bug_445128_install-dir.patch"::"https://hg.mozilla.org/mozilla-central/raw-rev/8f74ddd39f61";
+        "no-crmf.diff")
+sha256sums=('4fb9b29f00ff4e94e78994308ffa52bce818978009e0d8229203d6ac4210b0f4'
+            '01096e58c898e1b37cba581e1cc0f325d1c402091ccc4a2491543b39add40c6c'
+            'd589572a0e36b8500ed12937727e540a13b635c7ac12621a10ff675250b61175'
+            '882133b77840356985a81e496b4ddc443f8f33c068cfb7ef0858497820adcfff'
+            '6417fda6af8e610556f662fca28b2c25ceedb3e6970923a4eec562389b00b6d6'
+            '7760ebe71f4057cbd2f52b715abaf0d944c14c39e2bb2a5322114ad8451e12d9'
+            '806cbe936720676ea8d82c5f2bb880ca632181b07b0cf24a47c064a3485b7c7f'
+            '18fbcfda13dd7d30d3c1310da15a133f90bf9ce6b7cfa15de833928e7d9efe95'
+            '02000d185e647aa20ca336e595b4004bb29cdae9d8f317f90078bdcc7a36e873')
 
 prepare() {
-  cd "${pkgname}"
-  # Remove unused files
-  rm "precomplete" "removed-files"
-  # Use system wide dictionaries
-  rm -r "dictionaries" "hyphenation"
-  # Remove all language packs except english
-  mv "distribution/extensions/langpack-en-US@${pkgname}.org.xpi" "${srcdir}"
-  rm -r "distribution"
-  # Use system libraries
-  for _file in "libnspr4.so" "libplc4.so" "libplds4.so" "libfreeblpriv3.chk" \
-               "libfreeblpriv3.so" "libnss3.so" "libnssckbi.so" "libssl3.so" \
-               "libnssutil3.so" "libsmime3.so" "libsoftokn3.chk" 
"libsoftokn3.so"
-  do
-    rm "${_file}"
-    sed -i "/${_file}/d" "dependentlibs.list"
-  done
+  mkdir path
+  ln -s /usr/bin/python2 path/python
+
+  cd "${srcdir}/gecko-dev-${_gecko_dev_revision}"*/
+
+  # https://bugzilla.mozilla.org/show_bug.cgi?id=1427455
+  patch -Np1 -i ../bug_1427455-unused-variables.patch
+
+  # https://bugzilla.mozilla.org/show_bug.cgi?id=445128
+  patch -Np1 -i ../bug_445128_install-dir.patch
+
+  # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991
+  patch -Np1 -i ../no-crmf.diff
+
+  # https://bugzilla.mozilla.org/show_bug.cgi?id=1353650
+  patch -Np1 -i ../bug_1353650_icu59.patch
+
+  # https://bugzilla.mozilla.org/show_bug.cgi?id=1384062
+  patch -Np1 -i ../bug_1384062_systemresourcemonitor.patch
+
+  # Move files to their correct location
+  cp -r "${srcdir}/${pkgbase}-${pkgver}" bluegriffon
+  cp "${srcdir}/mozconfig" .mozconfig
+
+  # Apply BlueGriffon's upstream customizations
+  patch -Np1 -i "bluegriffon/config/gecko_dev_content.patch"
+  patch -Np1 -i "bluegriffon/config/gecko_dev_idl.patch"
 }
 
-package() {
-  # Install files
-  install -m 755 -d "${pkgdir}/usr/lib"
-  cp -LR "${pkgname}" "${pkgdir}/usr/lib"
-  # Install english language pack
-  install -m 755 -d "${pkgdir}/usr/lib/${pkgname}/distribution/extensions"
-  install -m 644 -t "${pkgdir}/usr/lib/${pkgname}/distribution/extensions" 
"${srcdir}/langpack-en-US@${pkgname}.org.xpi" 
-  # Install executable file
-  install -m 755 -d "${pkgdir}/usr/bin"
-  ln -sf /usr/lib/${pkgname}/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
+build() {
+  cd "${srcdir}/gecko-dev-${_gecko_dev_revision}"*/
+
+  # _FORTIFY_SOURCE causes configure failures
+  CPPFLAGS+=" -O2"
+
+  export PATH="$srcdir/path:$PATH"
+
+  # Build the package
+  ./mach build
+}
+
+package_bluegriffon() {
+  cd "${srcdir}/gecko-dev-${_gecko_dev_revision}"*/
+  DESTDIR="${pkgdir}" ./mach install
+
   # Install icons
+  cp bluegriffon/branding/mozicon128.png bluegriffon/branding/default128.png
   for _icon in 16 32 48 128 256; do
-      install -m 644 -D "icon-${_icon}.png" 
"${pkgdir}/usr/share/icons/hicolor/${_icon}x${_icon}/apps/${pkgname}.png"
+      install -Dm644 bluegriffon/branding/default${_icon}.png \
+        
"${pkgdir}/usr/share/icons/hicolor/${_icon}x${_icon}/apps/${pkgbase}.png"
   done
+
   # Install desktop file
-  install -m 644 -D "${pkgname}.desktop" 
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
-  # Use system wide dictionaries
-  ln -sf /usr/share/hunspell "${pkgdir}/usr/lib/${pkgname}/dictionaries"
-  ln -sf /usr/share/hyphen "${pkgdir}/usr/lib/${pkgname}/hyphenation"
+  install -Dm644 ../${pkgbase}.desktop \
+    "${pkgdir}/usr/share/applications/${pkgbase}.desktop"
+
+  # Use system-provided dictionaries
+  rm -r "$pkgdir"/usr/lib/$pkgbase/{dictionaries,hyphenation}
+  ln -Ts /usr/share/hunspell "${pkgdir}/usr/lib/$pkgbase/dictionaries"
+  ln -Ts /usr/share/hyphen "${pkgdir}/usr/lib/$pkgbase/hyphenation"
+
+  # Split out language packs
+  mv 
"$pkgdir"/usr/lib/$pkgbase/distribution/extensions/langpack-*@bluegriffon.org.xpi
 "$srcdir"
+  install -Dm644 "$srcdir/langpack-en...@bluegriffon.org.xpi" \
+    
"$pkgdir/usr/lib/$pkgbase/distribution/extensions/langpack-en...@bluegriffon.org.xpi"
 }
 
+_languages=(
+  'cs     "Czech"'
+  'de     "German"'
+  'es-ES  "Spanish (Spain)"'
+  'fi     "Finnish"'
+  'fr     "French"'
+  'gl     "Galician"'
+  'he     "Hebrew"'
+  'hu     "Hungarian"'
+  'it     "Italian"'
+  'ja     "Japanese"'
+  'ko     "Korean"'
+  'nl     "Dutch"'
+  'pl     "Polish"'
+  'ru     "Russian"'
+  'sl     "Slovenian"'
+  'sr     "Serbian"'
+  'sv-SE  "Swedish"'
+  'zh-CN  "Chinese (Simplified)"'
+  'zh-TW  "Chinese (Traditional)"'
+)
+
+for _lang in "${_languages[@]}"; do
+  _locale=${_lang%% *}
+  _pkgname=bluegriffon-i18n-${_locale,,}
+
+  pkgname+=($_pkgname)
+  eval "package_$_pkgname() {
+    _package $_lang
+  }"
+done
+
+_package() {
+  pkgdesc="$2 language pack for Bluegriffon"
+  depends=("bluegriffon>=$pkgver")
+  provides=('bluegriffon-i18n')
+
+  install -Dm644 langpack-$1...@bluegriffon.org.xpi \
+    
"$pkgdir/usr/lib/$pkgbase/distribution/extensions/langpack-$1...@bluegriffon.org.xpi"
+}

Added: mozconfig
===================================================================
--- mozconfig                           (rev 0)
+++ mozconfig   2018-04-06 23:35:31 UTC (rev 314609)
@@ -0,0 +1,31 @@
+ac_add_options --enable-application=bluegriffon
+ac_add_options --enable-chrome-format=jar
+
+ac_add_options --prefix=/usr
+ac_add_options --enable-release
+ac_add_options --enable-gold
+ac_add_options --enable-pie
+ac_add_options --enable-optimize="-O2"
+
+# System libraries
+ac_add_options --with-system-zlib
+ac_add_options --with-system-bz2
+ac_add_options --with-system-icu
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-libvpx
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-ffi
+
+# Features
+ac_add_options --enable-alsa
+ac_add_options --enable-startup-notification
+ac_add_options --disable-gconf
+ac_add_options --disable-tests
+ac_add_options --disable-crashreporter
+ac_add_options --disable-webrtc
+ac_add_options --disable-dbm
+ac_add_options --disable-updater
+ac_add_options --disable-sandbox

Added: no-crmf.diff
===================================================================
--- no-crmf.diff                                (rev 0)
+++ no-crmf.diff        2018-04-06 23:35:31 UTC (rev 314609)
@@ -0,0 +1,15 @@
+diff --git i/old-configure.in w/old-configure.in
+index 12170a47568f..dbbaa0bc9194 100644
+--- i/old-configure.in
++++ w/old-configure.in
+@@ -1808,9 +1808,7 @@ if test -n "$_USE_SYSTEM_NSS"; then
+     AM_PATH_NSS(3.35, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS 
installed or your version is too old])])
+ fi
+ 
+-if test -n "$MOZ_SYSTEM_NSS"; then
+-   NSS_LIBS="$NSS_LIBS -lcrmf"
+-else
++if test -z "$MOZ_SYSTEM_NSS"; then
+    NSS_CFLAGS="-I${DIST}/include/nss"
+    case "${OS_ARCH}" in
+         # Only few platforms have been tested with GYP

Reply via email to