Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebase: build for cygwin #5186

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions rebase/001-rebase-4.4.1-msys2.patch
Original file line number Diff line number Diff line change
@@ -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], [[email protected]])
+AC_INIT([rebase], [4.5.0], [[email protected]])
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
Expand Down
7 changes: 4 additions & 3 deletions rebase/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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++" \
Expand Down