Skip to content

Commit

Permalink
CentOS build scripts fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trunkmaster committed Jun 24, 2024
1 parent d1d7bbb commit ced9731
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
19 changes: 19 additions & 0 deletions Libraries/gnustep/libs-base_initialize.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/config/config.initialize.m b/config/config.initialize.m
index bc103ae..b513d77 100644
--- a/config/config.initialize.m
+++ b/config/config.initialize.m
@@ -5,7 +5,13 @@
#include <stdio.h>

#if !defined(_MSC_VER)
-#include <unistd.h>
+/* Fix RedHat problematic unistd.h */
+#pragma push_macro("__block")
+#undef __block
+#define __block my__block
+#include_next <unistd.h>
+#pragma pop_macro("__block")
+/* #include <unistd.h> */
#endif

#if defined(_WIN32)
8 changes: 8 additions & 0 deletions Libraries/gnustep/nextspace-gnustep.spec
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ Patch1: pc.patch
Patch2: libs-gui_NSApplication.patch
Patch3: libs-gui_NSPopUpButton.patch
Patch4: libs-gui_GSThemeDrawing.patch
%if 0%{?el7}
Patch5: libs-base_initialize.patch
%endif

# Build GNUstep libraries in one RPM package
Provides: gnustep-base-%{BASE_VERSION}
Expand Down Expand Up @@ -150,6 +153,11 @@ cd %{_builddir}/nextspace-gnustep/libs-gui-gui-%{GUI_VERSION}/
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
%if 0%{?el7}
cp %{_sourcedir}/libs-base_initialize.patch %{_builddir}/nextspace-gnustep/libs-base-base-%{BASE_VERSION}/
cd %{_builddir}/nextspace-gnustep/libs-base-base-%{BASE_VERSION}/
%patch -P5 -p1
%endif

rm -rf %{buildroot}

Expand Down
7 changes: 6 additions & 1 deletion Packaging/RedHat/build_nextspace-gnustep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ cp ${PROJECT_DIR}/Libraries/gnustep/projectcenter-images.tar.gz ${RPM_SOURCES_DI
cp ${PROJECT_DIR}/Libraries/gnustep/pc.patch ${RPM_SOURCES_DIR}
cp ${PROJECT_DIR}/Libraries/gnustep/gorm.patch ${RPM_SOURCES_DIR}
cp ${PROJECT_DIR}/Libraries/gnustep/libs-gui_* ${RPM_SOURCES_DIR}
if [ "${OS_ID}" = "centos" ] && [ "${OS_VERSION}" = "7" ]; then
cp ${PROJECT_DIR}/Libraries/gnustep/libs-base_* ${RPM_SOURCES_DIR}
fi
print_H1 " Downloading Local GNUstep Back..."
tar zcf ${RPM_SOURCES_DIR}/back-art.tar.gz -C ${PROJECT_DIR}/Libraries/gnustep back-art

Expand All @@ -42,7 +45,9 @@ if [ $STATUS -eq 0 ]; then
install_rpm nextspace-gnustep-devel ${RPMS_DIR}/nextspace-gnustep-devel-${GNUSTEP_VERSION}.rpm
mv ${RPMS_DIR}/nextspace-gnustep-devel-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
mv ${RPMS_DIR}/nextspace-gnustep-debuginfo-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
mv ${RPMS_DIR}/nextspace-gnustep-devel-debuginfo-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
if [ -f ${RPMS_DIR}/nextspace-gnustep-debugsource-${GNUSTEP_VERSION}.rpm ];then
mv ${RPMS_DIR}/nextspace-gnustep-devel-debuginfo-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
fi
if [ -f ${RPMS_DIR}/nextspace-gnustep-debugsource-${GNUSTEP_VERSION}.rpm ];then
mv ${RPMS_DIR}/nextspace-gnustep-debugsource-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
fi
Expand Down
2 changes: 1 addition & 1 deletion Packaging/RedHat/nextspace_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ if [ "$YN" = "y" ]; then
if [ $OS_NAME == "centos" ]; then
if [ $VERSION_ID == "7" ]; then
sudo yum -y -q install centos-release-scl 2>&1 > /dev/null || exit 1
ENABLE_EPEL+=" --enable-repo=centos-sclo-sclo --enable-repo=centos-sclo-rh"
ENABLE_EPEL+=" --enablerepo=centos-sclo-sclo --enable-epo=centos-sclo-rh"
fi
fi
sudo yum -y -q install $ENABLE_EPEL NSDeveloper/*.rpm 2>&1 > /dev/null || exit 1
Expand Down

0 comments on commit ced9731

Please sign in to comment.