From 2b25df68cb5765322e038aeb536d2958a4509d4f Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Sat, 8 Apr 2023 02:13:49 -0300 Subject: [PATCH] Adding cross compiler bundle. --- locale/pw3270.pot | 2 +- win/bundle.common | 6 ++++-- win/bundle.cross | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 3 deletions(-) create mode 100755 win/bundle.cross diff --git a/locale/pw3270.pot b/locale/pw3270.pot index c922244..80d31b3 100644 --- a/locale/pw3270.pot +++ b/locale/pw3270.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-29 15:09-0300\n" +"POT-Creation-Date: 2023-04-08 01:14-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/win/bundle.common b/win/bundle.common index e116be2..996d8ef 100644 --- a/win/bundle.common +++ b/win/bundle.common @@ -36,7 +36,9 @@ if [ -z ${MINGW_PREFIX} ]; then echo "Cant determine mingw prefix" exit -1 fi -else +fi + +if [ -z ${PKG_CONFIG} ]; then PKG_CONFIG=${MINGW_PREFX}/bin/pkg-config fi @@ -45,7 +47,7 @@ GTK_BINARY_VERSION=$(${PKG_CONFIG} --variable=gtk_binary_version gtk+-3.0) GTK_LIBDIR=$(echo $(${PKG_CONFIG} --variable=libdir gtk+-3.0) | sed "s@^C:/@/c/@g") GDK_LOADERS=$(echo $(${PKG_CONFIG} --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0) | sed -e "s@${GTK_PREFIX}@@g") -buildroot=.bin/bundle +buildroot=$(readlink -f .bin/bundle) bindir="${buildroot}${MINGW_PREFIX}/bin" if [ -z "${WIN_ROOT}" ]; then diff --git a/win/bundle.cross b/win/bundle.cross new file mode 100755 index 0000000..2713943 --- /dev/null +++ b/win/bundle.cross @@ -0,0 +1,82 @@ +#!/bin/bash +# +# SPDX-License-Identifier: LGPL-3.0-or-later +# +# Copyright (C) 2023 Perry Werneck +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program. If not, see . +# + +# +# References: +# +# https://www.gtk.org/docs/installations/windows/ +# http://drup.org/gtk-warning-error-loading-icon-couldnt-recognize-image-file-format +# + +MINGW_PREFIX="/usr/x86_64-w64-mingw32/sys-root/mingw" +PKG_CONFIG="/usr/bin/x86_64-w64-mingw32-pkg-config" +MINGW_PACKAGE_PREFIX="mingw64" + +# Load bundle functions +. "$(dirname $(readlink -f "${0}"))/bundle.common" + +prepare + +# Build +make -C "${srcdir}" all +if [ "$?" != "0" ]; then + echo "Build failed" + exit -1 +fi + +make -C "${srcdir}" "DESTDIR=${buildroot}" install +if [ "$?" != "0" ]; then + echo "Install failed" + exit -1 +fi + +# Install pre-build packages +packages="lib3270 libv3270" +for package in ${packages} +do + PACKAGE_NAME=$(rpm -qa | grep "${MINGW_PACKAGE_PREFIX}-${package}" | grep -v devel) + echo "Unpacking ${PACKAGE_NAME}" + for FILE in $(rpm -ql "${PACKAGE_NAME}") + do + if [ ! -d ${FILE} ]; then + + FILEPATH="${buildroot}${FILE}" + mkdir -p "$(dirname ${FILEPATH})" + if [ "$?" != "0" ]; then + exit -1 + fi + + cp "${FILE}" "${FILEPATH}" + if [ "$?" != "0" ]; then + exit -1 + fi + fi + done + +done + +install_loaders +install_bin +install_locale +install_schemas +install_theme "Adwaita" +install_icons "Adwaita" + + -- libgit2 0.21.2