Skip to content

Commit ced9731

Browse files
committed
CentOS build scripts fixes
1 parent d1d7bbb commit ced9731

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/config/config.initialize.m b/config/config.initialize.m
2+
index bc103ae..b513d77 100644
3+
--- a/config/config.initialize.m
4+
+++ b/config/config.initialize.m
5+
@@ -5,7 +5,13 @@
6+
#include <stdio.h>
7+
8+
#if !defined(_MSC_VER)
9+
-#include <unistd.h>
10+
+/* Fix RedHat problematic unistd.h */
11+
+#pragma push_macro("__block")
12+
+#undef __block
13+
+#define __block my__block
14+
+#include_next <unistd.h>
15+
+#pragma pop_macro("__block")
16+
+/* #include <unistd.h> */
17+
#endif
18+
19+
#if defined(_WIN32)

Libraries/gnustep/nextspace-gnustep.spec

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Patch1: pc.patch
3535
Patch2: libs-gui_NSApplication.patch
3636
Patch3: libs-gui_NSPopUpButton.patch
3737
Patch4: libs-gui_GSThemeDrawing.patch
38+
%if 0%{?el7}
39+
Patch5: libs-base_initialize.patch
40+
%endif
3841

3942
# Build GNUstep libraries in one RPM package
4043
Provides: gnustep-base-%{BASE_VERSION}
@@ -150,6 +153,11 @@ cd %{_builddir}/nextspace-gnustep/libs-gui-gui-%{GUI_VERSION}/
150153
%patch -P2 -p1
151154
%patch -P3 -p1
152155
%patch -P4 -p1
156+
%if 0%{?el7}
157+
cp %{_sourcedir}/libs-base_initialize.patch %{_builddir}/nextspace-gnustep/libs-base-base-%{BASE_VERSION}/
158+
cd %{_builddir}/nextspace-gnustep/libs-base-base-%{BASE_VERSION}/
159+
%patch -P5 -p1
160+
%endif
153161

154162
rm -rf %{buildroot}
155163

Packaging/RedHat/build_nextspace-gnustep.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ cp ${PROJECT_DIR}/Libraries/gnustep/projectcenter-images.tar.gz ${RPM_SOURCES_DI
2020
cp ${PROJECT_DIR}/Libraries/gnustep/pc.patch ${RPM_SOURCES_DIR}
2121
cp ${PROJECT_DIR}/Libraries/gnustep/gorm.patch ${RPM_SOURCES_DIR}
2222
cp ${PROJECT_DIR}/Libraries/gnustep/libs-gui_* ${RPM_SOURCES_DIR}
23+
if [ "${OS_ID}" = "centos" ] && [ "${OS_VERSION}" = "7" ]; then
24+
cp ${PROJECT_DIR}/Libraries/gnustep/libs-base_* ${RPM_SOURCES_DIR}
25+
fi
2326
print_H1 " Downloading Local GNUstep Back..."
2427
tar zcf ${RPM_SOURCES_DIR}/back-art.tar.gz -C ${PROJECT_DIR}/Libraries/gnustep back-art
2528

@@ -42,7 +45,9 @@ if [ $STATUS -eq 0 ]; then
4245
install_rpm nextspace-gnustep-devel ${RPMS_DIR}/nextspace-gnustep-devel-${GNUSTEP_VERSION}.rpm
4346
mv ${RPMS_DIR}/nextspace-gnustep-devel-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
4447
mv ${RPMS_DIR}/nextspace-gnustep-debuginfo-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
45-
mv ${RPMS_DIR}/nextspace-gnustep-devel-debuginfo-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
48+
if [ -f ${RPMS_DIR}/nextspace-gnustep-debugsource-${GNUSTEP_VERSION}.rpm ];then
49+
mv ${RPMS_DIR}/nextspace-gnustep-devel-debuginfo-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
50+
fi
4651
if [ -f ${RPMS_DIR}/nextspace-gnustep-debugsource-${GNUSTEP_VERSION}.rpm ];then
4752
mv ${RPMS_DIR}/nextspace-gnustep-debugsource-${GNUSTEP_VERSION}.rpm ${RELEASE_DEV}
4853
fi

Packaging/RedHat/nextspace_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ if [ "$YN" = "y" ]; then
100100
if [ $OS_NAME == "centos" ]; then
101101
if [ $VERSION_ID == "7" ]; then
102102
sudo yum -y -q install centos-release-scl 2>&1 > /dev/null || exit 1
103-
ENABLE_EPEL+=" --enable-repo=centos-sclo-sclo --enable-repo=centos-sclo-rh"
103+
ENABLE_EPEL+=" --enablerepo=centos-sclo-sclo --enable-epo=centos-sclo-rh"
104104
fi
105105
fi
106106
sudo yum -y -q install $ENABLE_EPEL NSDeveloper/*.rpm 2>&1 > /dev/null || exit 1

0 commit comments

Comments
 (0)