[geany/geany-plugins] 529208: Merge pull request #1107 from eht16/windows_full_cross_build
Frank Lanitz
git-noreply at xxxxx
Sun Sep 19 13:48:01 UTC 2021
Branch: refs/heads/master
Author: Frank Lanitz <frank at frank.uvena.de>
Committer: GitHub <noreply at github.com>
Date: Sun, 19 Sep 2021 13:48:01 UTC
Commit: 529208326747a9812bd63a9687f8abaf16c7c48f
https://github.com/geany/geany-plugins/commit/529208326747a9812bd63a9687f8abaf16c7c48f
Log Message:
-----------
Merge pull request #1107 from eht16/windows_full_cross_build
Windows full cross build and switch to x86_64+GTK3
Modified Paths:
--------------
build/geany-plugins.ico
build/geany-plugins.nsi
build/gtk-bundle-from-msys2.sh
Modified: build/geany-plugins.ico
0 lines changed, 0 insertions(+), 0 deletions(-)
===================================================================
No diff available, check online
Modified: build/geany-plugins.nsi
153 lines changed, 35 insertions(+), 118 deletions(-)
===================================================================
@@ -42,7 +42,6 @@ Unicode true
!define GEANY_DIR_REGKEY "Software\Geany"
; Geany version should be major.minor only (patch level is ignored for version checking)
!define REQUIRED_GEANY_VERSION "1.38"
-!define RESOURCEDIR "geany-plugins-${PRODUCT_VERSION}"
;;;;;;;;;;;;;;;;;;;;;
; Version resource ;
@@ -54,17 +53,29 @@ VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey "LegalCopyright" "Copyright 2009-2019 by the Geany developer team"
VIAddVersionKey "FileDescription" "${PRODUCT_NAME} Installer"
-BrandingText "$(^NAME) installer (NSIS 3.04)"
+BrandingText "$(^NAME) installer (NSIS ${NSIS_VERSION})"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
SetCompressor /SOLID lzma
ShowInstDetails hide
ShowUnInstDetails hide
XPStyle on
ManifestSupportedOS all
-OutFile "geany-plugins-${PRODUCT_VERSION}_setup.exe"
+
+!ifndef GEANY_PLUGINS_INSTALLER_NAME
+!define GEANY_PLUGINS_INSTALLER_NAME "geany-plugins-${PRODUCT_VERSION}_setup.exe"
+!endif
+!ifndef GEANY_PLUGINS_RELEASE_DIR
+!define GEANY_PLUGINS_RELEASE_DIR "geany-plugins-${PRODUCT_VERSION}"
+!endif
+!ifndef DEPENDENCY_BUNDLE_DIR
+!define DEPENDENCY_BUNDLE_DIR "contrib"
+!endif
+
+OutFile "${GEANY_PLUGINS_INSTALLER_NAME}"
Var Answer
Var UserName
+Var GEANY_INSTDIR
Var UNINSTDIR
;;;;;;;;;;;;;;;;
@@ -79,15 +90,13 @@ ReserveFile "${NSISDIR}\Plugins\x86-unicode\InstallOptions.dll"
ReserveFile "${NSISDIR}\Plugins\x86-unicode\LangDLL.dll"
!define MUI_ABORTWARNING
-; FIXME hard-coded path...should we add geany.ico to the geany-plugins repo?
-!define MUI_ICON "..\geany\icons\geany.ico"
+!define MUI_ICON "geany-plugins.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall-full.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
-; FIXME
-!insertmacro MUI_PAGE_LICENSE "${RESOURCEDIR}\share\doc\geany-plugins\addons\Copying"
+!insertmacro MUI_PAGE_LICENSE "${GEANY_PLUGINS_RELEASE_DIR}\share\doc\geany-plugins\addons\COPYING"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
@@ -110,36 +119,36 @@ Section "!Program Files" SEC01
SetOverwrite ifnewer
SetOutPath "$INSTDIR\bin"
- File /r "${RESOURCEDIR}\bin\libgeanypluginutils-0.dll"
+ File /r "${GEANY_PLUGINS_RELEASE_DIR}\bin\libgeanypluginutils-0.dll"
SetOutPath "$INSTDIR\lib"
- File /r "${RESOURCEDIR}\lib\*.dll"
+ File /r "${GEANY_PLUGINS_RELEASE_DIR}\lib\*.dll"
SetOutPath "$INSTDIR\share\geany-plugins"
- File /r "${RESOURCEDIR}\share\geany-plugins\*"
+ File /r "${GEANY_PLUGINS_RELEASE_DIR}\share\geany-plugins\*"
SectionEnd
Section "Language Files" SEC02
SectionIn 1
SetOutPath "$INSTDIR\share\locale"
- File /r "${RESOURCEDIR}\share\locale\*"
+ File /r "${GEANY_PLUGINS_RELEASE_DIR}\share\locale\*"
; dependency translations
SetOutPath "$INSTDIR\share\locale"
- File /r "contrib\share\locale\*"
+ File /r "${DEPENDENCY_BUNDLE_DIR}\share\locale\*"
SectionEnd
Section "Documentation" SEC03
SectionIn 1
SetOverwrite ifnewer
SetOutPath "$INSTDIR\share\doc\geany-plugins"
- File /r "${RESOURCEDIR}\share\doc\geany-plugins\*"
+ File /r "${GEANY_PLUGINS_RELEASE_DIR}\share\doc\geany-plugins\*"
SectionEnd
Section "Dependencies" SEC04
SectionIn 1
SetOverwrite ifnewer
SetOutPath "$INSTDIR"
- File /r /x "*.mo" "contrib\"
+ File /r /x "*.mo" "${DEPENDENCY_BUNDLE_DIR}\"
SectionEnd
Section -Post
@@ -175,23 +184,18 @@ Section Uninstall
Delete "$INSTDIR\lib\geany\geanyinsertnum.dll"
Delete "$INSTDIR\lib\geany\geanylatex.dll"
Delete "$INSTDIR\lib\geany\latex.dll"
- ; Keep for geanylipsum propper deleting old dll some time
- Delete "$INSTDIR\lib\geany\geanylipsum.dll"
Delete "$INSTDIR\lib\geany\geanylua.dll"
Delete "$INSTDIR\lib\geany\geanymacro.dll"
Delete "$INSTDIR\lib\geany\geanyminiscript.dll"
Delete "$INSTDIR\lib\geany\geanynumberedbookmarks.dll"
Delete "$INSTDIR\lib\geany\geanypg.dll"
Delete "$INSTDIR\lib\geany\geanyprj.dll"
- ; Keep for geanysendmail propper deleting old dll some time
- Delete "$INSTDIR\lib\geany\geanysendmail.dll"
Delete "$INSTDIR\lib\geany\geanyvc.dll"
Delete "$INSTDIR\lib\geany\geniuspaste.dll"
Delete "$INSTDIR\lib\geany\git-changebar.dll"
Delete "$INSTDIR\lib\geany\keyrecord.dll"
Delete "$INSTDIR\lib\geany\lipsum.dll"
Delete "$INSTDIR\lib\geany\lineoperations.dll"
- Delete "$INSTDIR\lib\geany\markdown.dll"
Delete "$INSTDIR\lib\geany\overview.dll"
Delete "$INSTDIR\lib\geany\pairtaghighlighter.dll"
Delete "$INSTDIR\lib\geany\pohelper.dll"
@@ -205,151 +209,60 @@ Section Uninstall
Delete "$INSTDIR\lib\geany\treebrowser.dll"
Delete "$INSTDIR\lib\geany\updatechecker.dll"
Delete "$INSTDIR\lib\geany\vimode.dll"
- Delete "$INSTDIR\lib\geany\webhelper.dll"
Delete "$INSTDIR\lib\geany\workbench.dll"
Delete "$INSTDIR\lib\geany\xmlsnippets.dll"
Delete "$INSTDIR\bin\ctags.exe"
- Delete "$INSTDIR\bin\gpg2.exe"
+ Delete "$INSTDIR\bin\gpg.exe"
Delete "$INSTDIR\bin\gpgconf.exe"
Delete "$INSTDIR\bin\gpgme-tool.exe"
Delete "$INSTDIR\bin\gpgme-w32spawn.exe"
Delete "$INSTDIR\bin\libassuan-0.dll"
- Delete "$INSTDIR\bin\libbrotlicommon.dll"
- Delete "$INSTDIR\bin\libbrotlidec.dll"
- Delete "$INSTDIR\bin\libbrotlienc.dll"
+ Delete "$INSTDIR\bin\libcrypto-1_1-x64.dll"
Delete "$INSTDIR\bin\libctpl-2.dll"
- Delete "$INSTDIR\bin\libcrypto-1_1.dll"
- Delete "$INSTDIR\bin\libcurl-4.dll"
- Delete "$INSTDIR\bin\libdbus-1-3.dll"
- Delete "$INSTDIR\bin\libdbus-glib-1-2.dll"
- Delete "$INSTDIR\bin\libeay32.dll"
Delete "$INSTDIR\bin\libenchant-2.dll"
- Delete "$INSTDIR\bin\libexslt-0.dll"
Delete "$INSTDIR\bin\libgcrypt-20.dll"
- Delete "$INSTDIR\bin\libgeoclue-0.dll"
- Delete "$INSTDIR\bin\libgif-7.dll"
Delete "$INSTDIR\bin\libgit2.dll"
- Delete "$INSTDIR\bin\libgmp-10.dll"
- Delete "$INSTDIR\bin\libgmpxx-4.dll"
- Delete "$INSTDIR\bin\libgnutls-30.dll"
- Delete "$INSTDIR\bin\libgnutlsxx-28.dll"
Delete "$INSTDIR\bin\libgpg-error-0.dll"
Delete "$INSTDIR\bin\libgpgme-11.dll"
Delete "$INSTDIR\bin\libgpgme-glib-11.dll"
- Delete "$INSTDIR\bin\libqgpgme-7.dll"
Delete "$INSTDIR\bin\libgpgmepp-6.dll"
- Delete "$INSTDIR\bin\libgstallocators-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstapp-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstaudio-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstbase-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstcheck-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstcontroller-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstfft-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstgl-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstnet-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstpbutils-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstreamer-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstriff-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstrtp-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstrtsp-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstsdp-1.0-0.dll"
- Delete "$INSTDIR\bin\libgsttag-1.0-0.dll"
- Delete "$INSTDIR\bin\libgstvideo-1.0-0.dll"
- Delete "$INSTDIR\bin\libgtkspell-0.dll"
- Delete "$INSTDIR\bin\libgtkspell3-*.dll"
+ Delete "$INSTDIR\bin\libgtkspell3-3-0.dll"
Delete "$INSTDIR\bin\libhistory8.dll"
- Delete "$INSTDIR\bin\libhogweed-6.dll"
Delete "$INSTDIR\bin\libhttp_parser-2.dll"
Delete "$INSTDIR\bin\libhunspell-1.7-0.dll"
- Delete "$INSTDIR\bin\libicudt61.dll"
- Delete "$INSTDIR\bin\libicutu61.dll"
- Delete "$INSTDIR\bin\libicuuc61.dll"
- Delete "$INSTDIR\bin\libicuin61.dll"
- Delete "$INSTDIR\bin\libicuio61.dll"
- Delete "$INSTDIR\bin\libicule61.dll"
- Delete "$INSTDIR\bin\libiculx61.dll"
- Delete "$INSTDIR\bin\libicutest61.dll"
- Delete "$INSTDIR\bin\libicutu67.dll"
- Delete "$INSTDIR\bin\libicuuc67.dll"
- Delete "$INSTDIR\bin\libicudt67.dll"
- Delete "$INSTDIR\bin\libicuin67.dll"
- Delete "$INSTDIR\bin\libicuio67.dll"
- Delete "$INSTDIR\bin\libicule67.dll"
- Delete "$INSTDIR\bin\libiculx67.dll"
- Delete "$INSTDIR\bin\libicutest67.dll"
- Delete "$INSTDIR\bin\libicutu67.dll"
- Delete "$INSTDIR\bin\libicuuc67.dll"
Delete "$INSTDIR\bin\libidn2-0.dll"
- Delete "$INSTDIR\bin\libjavascriptcoregtk-1.0-0.dll"
- Delete "$INSTDIR\bin\libjavascriptcoregtk-3.0-0.dll"
- Delete "$INSTDIR\bin\libjpeg-8.dll"
Delete "$INSTDIR\bin\liblzma-5.dll"
- Delete "$INSTDIR\bin\libnettle-8.dll"
Delete "$INSTDIR\bin\libnghttp2-14.dll"
- Delete "$INSTDIR\bin\libogg-0.dll"
- Delete "$INSTDIR\bin\liborc-0.4-0.dll"
- Delete "$INSTDIR\bin\liborc-test-0.4-0.dll"
Delete "$INSTDIR\bin\libp11-kit-0.dll"
- Delete "$INSTDIR\bin\libproxy-1.dll"
Delete "$INSTDIR\bin\libpsl-5.dll"
+ Delete "$INSTDIR\bin\libqgpgme-7.dll"
Delete "$INSTDIR\bin\libreadline8.dll"
- Delete "$INSTDIR\bin\librtmp-1.dll"
Delete "$INSTDIR\bin\libsoup-2.4-1.dll"
Delete "$INSTDIR\bin\libsoup-gnome-2.4-1.dll"
Delete "$INSTDIR\bin\libsqlite3-0.dll"
Delete "$INSTDIR\bin\libssh2-1.dll"
- Delete "$INSTDIR\bin\libssl-1_1.dll"
+ Delete "$INSTDIR\bin\libssl-1_1-x64.dll"
Delete "$INSTDIR\bin\libsystre-0.dll"
- Delete "$INSTDIR\bin\libtasn1-6.dll"
Delete "$INSTDIR\bin\libtermcap-0.dll"
- Delete "$INSTDIR\bin\libtheora-0.dll"
- Delete "$INSTDIR\bin\libtheoradec-1.dll"
- Delete "$INSTDIR\bin\libtheoraenc-1.dll"
- Delete "$INSTDIR\bin\libtiff-5.dll"
- Delete "$INSTDIR\bin\libtiffxx-5.dll"
- Delete "$INSTDIR\bin\libtre-5.dll"
- Delete "$INSTDIR\bin\libturbojpeg.dll"
Delete "$INSTDIR\bin\libunistring-2.dll"
- Delete "$INSTDIR\bin\libvorbis-0.dll"
- Delete "$INSTDIR\bin\libvorbisenc-2.dll"
- Delete "$INSTDIR\bin\libvorbisfile-3.dll"
- Delete "$INSTDIR\bin\libvorbisidec-1.dll"
- Delete "$INSTDIR\bin\libwebkitgtk-1.0-0.dll"
- Delete "$INSTDIR\bin\libwebkitgtk-3.0-0.dll"
- Delete "$INSTDIR\bin\libwebp-7.dll"
- Delete "$INSTDIR\bin\libwebpdecoder-3.dll"
- Delete "$INSTDIR\bin\libwebpdemux-2.dll"
- Delete "$INSTDIR\bin\libwebpextras-0.dll"
- Delete "$INSTDIR\bin\libwebpmux-3.dll"
Delete "$INSTDIR\bin\libxml2-2.dll"
- Delete "$INSTDIR\bin\libxslt-1.dll"
Delete "$INSTDIR\bin\lua51.dll"
- Delete "$INSTDIR\bin\ssleay32.dll"
RMDir /r "$INSTDIR\etc\pki"
RMDir /r "$INSTDIR\lib\enchant-2"
- RMDir /r "$INSTDIR\lib\engines"
RMDir /r "$INSTDIR\lib\engines-1_1"
- RMDir /r "$INSTDIR\lib\gio"
- RMDir /r "$INSTDIR\lib\gstreamer-1.0"
RMDir /r "$INSTDIR\lib\pkcs11"
- RMDir /r "$INSTDIR\lib\sqlite3.33.0"
RMDir /r "$INSTDIR\lib\geany-plugins"
- RMDir /r "$INSTDIR\libexec\gstreamer-1.0"
RMDir /r "$INSTDIR\libexec\p11-kit"
RMDir /r "$INSTDIR\share\doc\geany-plugins"
RMDir /r "$INSTDIR\share\geany-plugins"
RMDir /r "$INSTDIR\share\enchant"
- RMDir /r "$INSTDIR\share\gstreamer-1.0"
RMDir /r "$INSTDIR\share\libgpg-error"
RMDir /r "$INSTDIR\share\p11-kit"
RMDir /r "$INSTDIR\share\pki"
RMDir /r "$INSTDIR\share\sqlite"
RMDir /r "$INSTDIR\share\vala"
- RMDir /r "$INSTDIR\share\webkitgtk-1.0"
- RMDir /r "$INSTDIR\share\webkitgtk-3.0"
- RMDir /r "$INSTDIR\share\xml\dbus-1"
RMDir /r "$INSTDIR\ssl\certs"
FindFirst $0 $1 "$INSTDIR\share\locale\*"
@@ -434,13 +347,13 @@ done:
Function CheckForGeany
; find and read Geany's installation directory and use it as our installation directory
- ReadRegStr $INSTDIR SHCTX "${GEANY_DIR_REGKEY}" "Path"
- StrCmp $INSTDIR "" 0 +3
+ ReadRegStr $GEANY_INSTDIR SHCTX "${GEANY_DIR_REGKEY}" "Path"
+ StrCmp $GEANY_INSTDIR "" 0 +3
MessageBox MB_OK|MB_ICONSTOP "Geany could not be found. Please install Geany first." /SD IDOK
Abort
; check Geany's version
- GetDLLVersion "$INSTDIR\bin\geany.exe" $R0 $R1
+ GetDLLVersion "$GEANY_INSTDIR\bin\geany.exe" $R0 $R1
IntOp $R2 $R0 >> 16
IntOp $R2 $R2 & 0x0000FFFF ; $R2 now contains major version
IntOp $R3 $R0 & 0x0000FFFF ; $R3 now contains minor version
@@ -482,6 +395,10 @@ Function .onInit
Abort
Call CheckForGeany
+ ; if $INSTDIR is empty (i.e. it was not provided via /D=... on command line), use Geany's one
+ ${If} $INSTDIR == ""
+ StrCpy $INSTDIR "$GEANY_INSTDIR"
+ ${EndIf}
; warn about a new install over an existing installation
ReadRegStr $R0 SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString"
Modified: build/gtk-bundle-from-msys2.sh
152 lines changed, 80 insertions(+), 72 deletions(-)
===================================================================
@@ -6,87 +6,60 @@
# shell. The extracted files will be placed into the current
# directory.
-ABI=i686
+ABI=x86_64 # do not change, i686 is not supported any longer
use_cache="no"
make_zip="no"
gtkv="3"
+run_pi="y"
+cross="no"
+
+# Wine commands for 64bit binaries, used only when "-x" is set
+EXE_WRAPPER_64="mingw-w64-x86_64-wine"
# ctags - binary for GeanyCTags plugin
# ctpl-git - for GeanyGenDoc plugin
# enchant, hunspell - for SpellCheck plugin
-# curl, glib-networking, gnutls, icu, libproxy, sqlite3, webkitgtk2/3 for WebHelper and Markdown plugins
# lua51 - for GeanyLua plugin
# gnupg, gpgme - for GeanyPG plugin
# libsoup - for UpdateChecker plugin
# libgit2 - for GitChangeBar plugin
# libxml2 - for PrettyPrinter plugin
-# gtkspell - for GeanyVC plugin
+# gtkspell3 - for GeanyVC plugin
# the rest is dependency-dependency
packages="
-p11-kit
-brotli
ca-certificates
ctags
ctpl-git
-curl
-dbus
-dbus-glib
enchant
-geoclue
-giflib
-glib-networking
-gmp
gnupg
-gnutls
gpgme
-gstreamer
-gst-plugins-base
http-parser
hunspell
-icu
libassuan
libgcrypt
-libgpg-error
libgit2
+libgpg-error
libidn2
-libjpeg-turbo
-libogg
libpsl
-libproxy
libsoup
libssh2
libsystre
-libtasn1
-libtheora
-libtiff
-libtre-git
libunistring
-libvorbis
-libvorbisidec-svn
-libwebp
libxml2
-libxslt
lua51
-nettle
nghttp2
openssl
-orc
+p11-kit
readline
-rtmpdump-git
sqlite3
termcap
xz
"
-gtk2_dependency_pkgs="
-gtkspell
-webkitgtk2
-"
gtk3_dependency_pkgs="
gtkspell3
-webkitgtk3
"
-
+gtk4_dependency_pkgs=""
package_urls=""
@@ -99,20 +72,28 @@ handle_command_line_options() {
"-z"|"--zip")
make_zip="yes"
;;
- "-2")
- gtkv="2"
- ;;
"-3")
gtkv="3"
;;
+ "-4")
+ gtkv="4"
+ ;;
+ "-n")
+ run_pi=""
+ ;;
+ "-x")
+ cross="yes"
+ ;;
"-h"|"--help")
- echo "gtk-bundle-from-msys2.sh [-c] [-h] [-z] [-2 | -3] [CACHEDIR]"
+ echo "gtk-bundle-from-msys2.sh [-c] [-h] [-z] [-3 | -4] [-x] [CACHEDIR]"
echo " -c Use pacman cache. Otherwise pacman will download"
echo " archive files"
echo " -h Show this help screen"
+ echo " -n Do not run post install scripts of the packages"
echo " -z Create a zip afterwards"
- echo " -2 Prefer gtk2"
echo " -3 Prefer gtk3"
+ echo " -4 Prefer gtk4"
+ echo " -x Set when the script is executed in a cross-compilation context (e.g. to use wine)"
echo "CACHEDIR Directory where to look for cached packages (default: /var/cache/pacman/pkg)"
exit 1
;;
@@ -123,6 +104,10 @@ handle_command_line_options() {
done
}
+set -e # stop on errors
+# enable extended globbing as we need it in _getpkg
+shopt -s extglob
+
initialize() {
if [ -z "$cachedir" ]; then
cachedir="/var/cache/pacman/pkg"
@@ -133,6 +118,11 @@ initialize() {
exit 1
fi
+ if [ "$cross" != "yes" ]; then
+ # if running natively, we do not need wine or any other wrappers
+ EXE_WRAPPER_64=""
+ fi
+
gtk="gtk$gtkv"
eval "gtk_dependency_pkgs=\${${gtk}_dependency_pkgs}"
@@ -142,29 +132,29 @@ ${gtk_dependency_pkgs}
"
}
-_remember_package_source() {
+_getpkg() {
if [ "$use_cache" = "yes" ]; then
- package_url=`pacman -Sp mingw-w64-${ABI}-${2}`
+ package_info=$(pacman -Qi mingw-w64-$ABI-$1)
+ package_version=$(echo "$package_info" | grep "^Version " | cut -d':' -f 2 | tr -d '[[:space:]]')
+ # use @(gz|xz|zst) to filter out signature files (e.g. mingw-w64-x86_64-...-any.pkg.tar.zst.sig)
+ ls $cachedir/mingw-w64-${ABI}-${1}-${package_version}-*.tar.@(gz|xz|zst) | sort -V | tail -n 1
else
- package_url="${1}"
+ # -dd to ignore dependencies as we listed them already above in $packages and
+ # make pacman ignore its possibly existing cache (otherwise we would get an URL to the cache)
+ pacman -Sddp --cachedir /nonexistent mingw-w64-${ABI}-${1}
fi
- package_urls="${package_urls}\n${package_url}"
}
-_getpkg() {
+_remember_package_source() {
if [ "$use_cache" = "yes" ]; then
- package_info=`pacman -Qi mingw-w64-$ABI-$1`
- package_version=`echo "$package_info" | grep "^Version " | cut -d':' -f 2 | tr -d '[[:space:]]'`
- ls $cachedir/mingw-w64-${ABI}-${1}-${package_version}-* | sort -V | tail -n 1
+ package_url=$(pacman -Sddp mingw-w64-${ABI}-${2})
else
- pacman -Sp mingw-w64-${ABI}-${1}
+ package_url="${1}"
fi
+ package_urls="${package_urls}\n${package_url}"
}
extract_packages() {
- # hack for libxml2 postinstall script which expects "bin/mkdir"
- mkdir -p bin
- cp /bin/mkdir bin/
# extract packages
for i in $pkgs; do
pkg=$(_getpkg $i)
@@ -179,28 +169,50 @@ extract_packages() {
fi
else
echo "Download $pkg using curl"
- curl -L "$pkg" | tar -x --xz
+ filename=$(basename "$pkg")
+ curl -s -o "$filename" -L "$pkg"
+ tar xf "$filename"
+ rm "$filename"
fi
- if [ -f .INSTALL ]; then
- echo "Running post_install script for \"$i\""
- /bin/bash -c ". .INSTALL; post_install"
+ if [ "$make_zip" = "yes" -a "$i" = "$gtk" ]; then
+ VERSION=$(grep ^pkgver .PKGINFO | sed -e 's,^pkgver = ,,' -e 's,-.*$,,')
fi
rm -f .INSTALL .MTREE .PKGINFO .BUILDINFO
done
}
move_extracted_files() {
echo "Move extracted data to destination directory"
- if [ -d mingw32 ]; then
+ if [ -d mingw64 ]; then
for d in bin etc home include lib libexec locale sbin share ssl var; do
- if [ -d "mingw32/$d" ]; then
+ if [ -d "mingw64/$d" ]; then
rm -rf $d
# prevent sporadic 'permission denied' errors on my system, not sure why they happen
sleep 0.5
- mv mingw32/$d .
+ mv mingw64/$d .
fi
done
- rmdir mingw32
+ rmdir mingw64
+ fi
+}
+
+delayed_post_install() {
+ if [ "$run_pi" ]; then
+ echo "Execute delayed post install tasks"
+ # Commands have been collected manually from the various .INSTALL scripts
+
+ # ca-certificates
+ DEST=etc/pki/ca-trust/extracted
+ # OpenSSL PEM bundle that includes trust flags
+ ${EXE_WRAPPER_64} bin/p11-kit extract --format=openssl-bundle --filter=certificates --overwrite $DEST/openssl/ca-bundle.trust.crt
+ ${EXE_WRAPPER_64} bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose server-auth $DEST/pem/tls-ca-bundle.pem
+ ${EXE_WRAPPER_64} bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose email $DEST/pem/email-ca-bundle.pem
+ ${EXE_WRAPPER_64} bin/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite --purpose code-signing $DEST/pem/objsign-ca-bundle.pem
+ ${EXE_WRAPPER_64} bin/p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite --purpose server-auth $DEST/java/cacerts
+ mkdir -p ssl/certs
+ cp -f $DEST/pem/tls-ca-bundle.pem ssl/certs/ca-bundle.crt
+ cp -f $DEST/pem/tls-ca-bundle.pem ssl/cert.pem
+ cp -f $DEST/openssl/ca-bundle.trust.crt ssl/certs/ca-bundle.trust.crt
fi
}
@@ -217,11 +229,10 @@ cleanup_unnecessary_files() {
rm -rf lib/cmake
rm -rf lib/pkgconfig
rm -rf lib/girepository-1.0
- rm -rf lib/icu
rm -rf lib/lua
rm -rf lib/p11-kit
- rm -rf lib/python2.7
- rm -rf lib/python3.8
+ rm -rf lib/python3.9
+ rm -rf lib/sqlite3.36.*
find lib -name '*.h' -delete
find lib -name '*.a' -delete
find lib -name '*.typelib' -delete
@@ -233,8 +244,6 @@ cleanup_unnecessary_files() {
rm -f lib/bin/libenchant_zemberek.dll
# enchant: remove aspell engine (it would require the aspell library which we don't need)
rm -f lib/enchant/libenchant_aspell.dll
- # libproxy: remove KDE module
- rm -f lib/modules/config_kde.dll
# sbin: cleanup sbin files
rm -rf sbin
# share: cleanup other unnecessary files
@@ -246,19 +255,17 @@ cleanup_unnecessary_files() {
rm -rf share/doc
rm -rf share/emacs
rm -rf share/GConf
- rm -rf share/geoclue-providers
rm -rf share/gir-1.0
rm -rf share/glib-2.0
rm -rf share/gnupg
- rm -rf share/gst-plugins-base
- rm -rf share/gstreamer-1.0
rm -rf share/gtk-doc
- rm -rf share/icu
rm -rf share/info
rm -rf share/lua
rm -rf share/man
rm -rf share/nghttp2
rm -rf share/readline
+ rm -rf share/sqlite
+ rm -rf share/vala
rm -rf share/zsh
# ssl: cleanup ssl files
rm -rf ssl/*.cnf
@@ -268,7 +275,7 @@ cleanup_unnecessary_files() {
find bin \
! -name '*.dll' \
! -name ctags.exe \
- ! -name gpg2.exe \
+ ! -name gpg.exe \
! -name gpgme-w32spawn.exe \
! -name gpgme-tool.exe \
! -name gpgconf.exe \
@@ -304,6 +311,7 @@ handle_command_line_options $@
initialize
extract_packages
move_extracted_files
+delayed_post_install
cleanup_unnecessary_files
create_bundle_dependency_info_file
create_zip_archive
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Plugins-Commits
mailing list