-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathlibobjc2.spec
More file actions
144 lines (115 loc) · 4.47 KB
/
libobjc2.spec
File metadata and controls
144 lines (115 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
%global toolchain clang
%global _hardened_build 0
Name: libobjc2
Version: 2.2.1
Release: 0%{?dist}
Summary: GNUstep Objecttive-C runtime library.
License: GPL v2.0
URL: https://github.com/gnustep/libobjc2
Source0: https://github.com/gnustep/libobjc2/archive/v%{version}.tar.gz
Source1: https://github.com/Tessil/robin-map/archive/v1.2.1.tar.gz
BuildRequires: cmake
BuildRequires: clang >= 7.0.1
BuildRequires: libtool
BuildRequires: libdispatch-devel >= 1.3
Requires: libdispatch >= 1.3
Provides: libobjc.so
Provides: libobjc.so.4.6
Conflicts: libobjc.so.4
%description
The GNUstep Objective-C runtime is designed as a drop-in replacement for the
GCC runtime. It supports both a legacy and a modern ABI, allowing code compiled
with old versions of GCC to be supported without requiring recompilation.
The modern ABI adds the following features:
* Non-fragile instance variables.
* Protocol uniquing.
* Object planes support.
* Declared property introspection.
Both ABIs support the following feature above and beyond the GCC runtime:
* The modern Objective-C runtime APIs, introduced with OS X 10.5.
* Blocks (closures).
* Low memory profile for platforms where memory usage is more important than speed.
* Synthesised property accessors.
* Efficient support for @synchronized()
* Type-dependent dispatch, eliminating stack corruption from mismatched selectors.
* Support for the associated reference APIs introduced with Mac OS X 10.6.
* Support for the automatic reference counting APIs introduced with Mac OS X 10.
%package devel
Summary: Development header files for libobjc2.
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development header files for libdispatch (includes kqueue and pthread_workqueue).
%prep
%setup -n libobjc2-%{version} -a 1
%build
CMAKE_CMD=cmake
unset CFLAGS
unset CXXFLAGS
unset LDFLAGS
${CMAKE_CMD} \
-DCMAKE_CXX_COMPILER=clang++ \
-B%{_builddir}/%{name}-%{version}/robin-map-1.2.1 \
-S%{_builddir}/%{name}-%{version}/robin-map-1.2.1
${CMAKE_CMD} --build robin-map-1.2.1
mkdir .build
cd .build
COMPILER_FLAGS="-I/usr/NextSpace/include -g -Wno-gnu-folding-constant"
${CMAKE_CMD} .. \
-Dtsl-robin-map_DIR=%{_builddir}/%{name}-%{version}/robin-map-1.2.1 \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DGNUSTEP_INSTALL_TYPE=NONE \
-DCMAKE_C_FLAGS="${COMPILER_FLAGS}" \
-DCMAKE_CXX_FLAGS="${COMPILER_FLAGS}" \
-DCMAKE_OBJC_FLAGS="${COMPILER_FLAGS}" \
-DCMAKE_LIBRARY_PATH=/usr/NextSpace/lib \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX=/usr/NextSpace \
-DCMAKE_MODULE_LINKER_FLAGS="-fuse-ld=/usr/bin/ld.gold -Wl,-rpath,/usr/NextSpace/lib" \
-DCMAKE_SKIP_RPATH=ON \
-DTESTS=OFF \
-DCMAKE_BUILD_TYPE=Release
make
%install
cd .build
make install DESTDIR=%{buildroot}
mv -v %{buildroot}/usr/NextSpace/include/Block.h %{buildroot}/usr/NextSpace/include/Block-libobjc.h
%files
/usr/NextSpace/lib/libobjc.so*
/usr/NextSpace/lib/pkgconfig
%files devel
/usr/NextSpace/include/objc
/usr/NextSpace/include/Block-libobjc.h
/usr/NextSpace/include/Block_private.h
%pre devel
if [ -f /usr/NextSpace/include/Block.h ];then
mv -v /usr/NextSpace/include/Block.h /usr/NextSpace/include/Block-libdispatch.h
ln -sv /usr/NextSpace/include/Block-libobjc.h /usr/NextSpace/include/Block.h
fi
%postun devel
if [ $1 -eq 0 -a -f /usr/NextSpace/include/Block-libdispatch.h ];then
mv /usr/NextSpace/include/Block-libdispatch.h /usr/NextSpace/include/Block.h
rm /usr/NextSpace/include/Block.h
fi
%changelog
* Tue Nov 5 2024 Andres Morales <armm77@icloud.com>
Support for CentOS 7 is being dropped.
* Thu Aug 27 2020 Sergii Stoian <stoyan255@gmail.com> - 2.1-0
- Switch to new ObjC library realease - 2.1
* Wed Apr 29 2020 Sergii Stoian <stoyan255@gmail.com> - 2.0-4
- Use clang from RedHat SCL repo on CentOS 7.
- Source file should be downloaded with `spectool -g` command into
SOURCES directory manually.
- SPEC file adopted for Fedora 31.
* Thu May 2 2019 Sergii Stoian <stoyan255@gmail.com> - 2.0-3
- build with released 2.0 verion of libobjc2
* Fri Mar 29 2019 Sergii Stoian <stoyan255@gmail.com> - 2.0-2
- now library can be build without GNUstep Make installed
- switch to libobjc2 installation routines
* Wed Mar 27 2019 Sergii Stoian <stoyan255@gmail.com> - 2.0-1
- Fix an issue with incorrect offsets for the first ivar.
- Rework some of the ivar offset calculations.
* Fri Mar 22 2019 Sergii Stoian <stoyan255@gmail.com> 2.0
- New 2.0 version that aimed to build by clang 7.0.
* Wed Oct 12 2016 Sergii Stoian <stoyan255@gmail.com> 1.8.2-1
- Initial spec.