rebase: build for cygwin

This commit is contained in:
Christoph Reiter 2025-02-03 09:12:51 +01:00
parent f77439151e
commit e1ad76e050
2 changed files with 4 additions and 73 deletions

View File

@ -1,73 +1,3 @@
diff -urN rebase-4.4.1.orig/build.sh rebase-4.4.1/build.sh
--- rebase-4.4.1.orig/build.sh 2014-06-13 22:24:51.315930500 +0100
+++ rebase-4.4.1/build.sh 2014-06-13 22:25:12.462140000 +0100
@@ -30,7 +30,9 @@
Prefix=/mingw
confargs="--with-dash --prefix=`cd $Prefix && pwd -W`"
;;
- MSYS*) confargs="--with-dash --prefix=$Prefix"
+ MSYS*) CXXFLAGS="-static -static-libgcc -static-libstdc++"
+ CFLAGS="-static -static-libgcc"
+ confargs="--prefix=$Prefix"
;;
esac
diff -urN rebase-4.4.1.orig/build-aux/config.guess rebase-4.4.1/build-aux/config.guess
--- rebase-4.4.1.orig/build-aux/config.guess 2014-06-13 22:24:51.313930400 +0100
+++ rebase-4.4.1/build-aux/config.guess 2014-06-13 22:25:12.465140200 +0100
@@ -843,6 +843,9 @@
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
+ echo x86_64-unknown-msys
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
diff -urN rebase-4.4.1.orig/configure.ac rebase-4.4.1/configure.ac
--- rebase-4.4.1.orig/configure.ac 2014-06-13 22:24:51.317930600 +0100
+++ rebase-4.4.1/configure.ac 2014-06-13 22:25:32.231270700 +0100
@@ -2,7 +2,7 @@
# configure.ac for rebase
AC_PREREQ([2.64])
-AC_INIT([rebase], [4.5.0], [cygwin@cygwin.com])
+AC_INIT([rebase], [4.5.0], [msys2-users@lists.sourceforge.net])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([peflags.c])
AC_PREFIX_DEFAULT([/usr])
@@ -28,19 +28,12 @@
AC_CHECK_DECLS([cygwin_conv_path], [],[
case "$host" in
- *cygwin* ) AC_MSG_ERROR([At least cygwin-1.7 is required]) ;;
+ *cygwin* | *msys* ) AC_MSG_ERROR([At least cygwin-1.7 is required]) ;;
esac],dnl
[[#include <sys/cygwin.h>]])
-LIBOBJS=
case "$host" in
- *msys* ) AC_LIBOBJ([getopt_long])
- AC_LIBOBJ([strtoll]) ;;
-esac
-AC_SUBST([LIBOBJS])
-
-case "$host" in
- *mingw* | *msys* ) DEFAULT_OFFSET_VALUE=0x10000 ;;
+ *mingw* ) DEFAULT_OFFSET_VALUE=0x10000 ;;
*) DEFAULT_OFFSET_VALUE=0 ;;
esac
AC_SUBST(DEFAULT_OFFSET_VALUE)
@@ -48,7 +41,7 @@
case "$host" in
*msys* ) EXTRA_CFLAG_OVERRIDES=
EXTRA_LDFLAG_OVERRIDES="-static-libgcc"
- EXTRA_CXX_LDFLAG_OVERRIDES=
+ EXTRA_CXX_LDFLAG_OVERRIDES="-static-libstdc++"
;;
*cygwin* ) EXTRA_CFLAG_OVERRIDES=
EXTRA_LDFLAG_OVERRIDES="-static-libgcc"
diff -urN rebase-4.4.1.orig/imagehelper/objectfile.cc rebase-4.4.1/imagehelper/objectfile.cc
--- rebase-4.4.1.orig/imagehelper/objectfile.cc 2014-06-13 22:24:51.322930900 +0100
+++ rebase-4.4.1/imagehelper/objectfile.cc 2014-06-13 22:25:12.467140300 +0100

View File

@ -21,8 +21,8 @@ source=(${pkgname}-${pkgver}::git://sourceware.org/git/cygwin-apps/rebase.git#ta
'005-peflags-add-support-for-IMAGE_DLLCHARACTERISTICS_GUA.patch'
'autorebase.bat'
'rebase.hook')
sha256sums=('SKIP'
'2ca14be8dad62d97e3d3931bf656686086d497e4b7a271ee294db6a1b3e26dfb'
sha256sums=('f8ebc4dec0aeceecad2ed96662c83c7da5dfc3c88fddd1579ac4055756a418f9'
'36531bb3ddae6ad4b2db88560e0a7f62848096374696f9e07d04782f8c610bc7'
'b06d561d82e7c32573082cf0207ca80275bab241c61debf2d3d8cc10cf79e31b'
'4b789d2f6ae7de9afd778cce5823600ee0f53590b3e70e133dcafbb583d6cbbb'
'35484af07e1df8b00821428b774744537106f99592d849ad7db26b41f570fa8c'
@ -49,7 +49,8 @@ prepare() {
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr \
local CYGWIN_CHOST="${CHOST/-msys/-cygwin}"
./configure --build=${CYGWIN_CHOST} --prefix=/usr \
--sysconfdir=/etc \
--with-posix-shell=/usr/bin/dash \
CXXFLAGS="${CXXFLAGS} -static -static-libgcc -static-libstdc++" \