commit c075f6dc846de197694335bca9ad2ca066fc8c32
Author: Jakub Bogusz <[email protected]>
Date:   Sun Sep 22 09:36:55 2013 +0200

    - up to 1.7
    - added link patch (link libobjcxx with libobjc)

 libobjc2-link.patch | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 libobjc2.spec       |  97 +++++++++++++++++++++++++++---------------
 2 files changed, 182 insertions(+), 34 deletions(-)
---
diff --git a/libobjc2.spec b/libobjc2.spec
index 4a16b08..e6eb3f2 100644
--- a/libobjc2.spec
+++ b/libobjc2.spec
@@ -1,72 +1,101 @@
 # TODO: make gcc-objc separate libobjc
+# - separate libobjcxx? (requires libstdc++ while libobjc doesn't)
+# - use -DLIBOBJC_NAME=objc2 to allow parallel installation with gcc's libobjc?
 #
 Summary:       GNUStep runtime for Objective C
+Summary(pl.UTF-8):     Biblioteka uruchomieniowa dla Objective C z projektu 
GNUstep
 Name:          libobjc2
-Version:       1.2
+Version:       1.7
 Release:       0.1
 License:       MIT
-Group:         Development/Libraries
+Group:         Libraries
+Source0:       http://download.gna.org/gnustep/%{name}-%{version}.tar.bz2
+# Source0-md5: 7bd9f154ed2f78b3cf55ede7dea536bd
+Patch0:                %{name}-link.patch
 URL:           http://www.gnustep.org/
-Source0:       http://download.gna.org/gnustep/libobjc2-1.2.tar.bz2
-# Source0-md5: ef692c6edfdeba360fe714d589552efc
+BuildRequires: clang
+BuildRequires: cmake >= 2.8
 BuildRequires: gnustep-make
+BuildRequires: libstdc++-devel
+BuildRequires: pkgconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-This is the 1.2 release of the GNUstep Objective-C runtime (a.k.a.
-libobjc2).  This runtime was designed to support the features of Objective-C 2
-for use with GNUstep and other Objective-C programs.  This release contains
-several bug fixes, and is tested with the current GNUstep trunk, so will be
-compatible with the upcoming GNUstep release.
+This is the GNUstep Objective-C runtime (a.k.a. libobjc2). This
+runtime was designed to support the features of Objective-C 2 for use
+with GNUstep and other Objective-C programs.
+
+%description -l pl.UTF-8
+Ten pakiet zawiera bibliotekę uruchomieniową Objective-C z projektu
+GNUstep (znaną także jako libobjc2). Ta biblioteka została
+zaprojektowana, aby wspierać cechy języka Objective-C 2, w celu
+używania w GNUstepie i innych programach w Objective-C.
 
 %package devel
-Summary:       Development tools for programs using libobjc2
+Summary:       Development files for programs using libobjc2
+Summary(pl.UTF-8):     Pliki programistyczne do biblioteki libobjc2
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 
 %description devel
-This is the 1.2 release of the GNUstep Objective-C runtime (a.k.a.
-libobjc2).  This runtime was designed to support the features of Objective-C 2
-for use with GNUstep and other Objective-C programs.  This release contains
-several bug fixes, and is tested with the current GNUstep trunk, so will be
-compatible with the upcoming GNUstep release.
+This package contains the header files needed for developing programs
+using the libobjc2 library.
+
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe niezbędne do tworzenia programów
+wykorzystujących bibliotekę libobjc2.
+
+%package static
+Summary:       Static libobjc2 library
+Summary(pl.UTF-8):     Statyczna biblioteka libobjc2
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
 
-This package contains the header files and libraries needed for
-developing programs using the libobjc2 library.
+%description static
+Static libobjc2 library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libobjc2.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-export GNUSTEP_MAKEFILES=%{_datadir}/GNUstep/Makefiles
-export GNUSTEP_FLATTENED=yes
-%{__make} -j1 \
-       OPTFLAG="%{rpmcflags}" \
-       messages=yes
+install -d build
+cd build
+%cmake .. \
+       -DBUILD_STATIC_LIBOBJC=ON \
+       -DCMAKE_C_COMPILER="clang" \
+       -DCMAKE_CXX_COMPILER="clang++" \
+       -DGNUSTEP_INSTALL_TYPE=SYSTEM
+
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-export GNUSTEP_MAKEFILES=%{_datadir}/GNUstep/Makefiles
-export GNUSTEP_FLATTENED=yes
 
-%{__make} -j1 install \
-       GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT 
 
-#%find_lang %{name}
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc README 
-%attr(755,root,root) %{_libdir}/libobjc.so.*
+%doc ANNOUNCE* API COPYING README
+%attr(755,root,root) %{_libdir}/libobjc.so.*.*
+%attr(755,root,root) %{_libdir}/libobjcxx.so.*.*
 
 %files devel
 %defattr(644,root,root,755)
-%{_includedir}/objc/*.h
-%{_libdir}/libobjc.so
+%attr(755,root,root) %{_libdir}/libobjc.so
+%attr(755,root,root) %{_libdir}/libobjcxx.so
+%{_includedir}/objc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libobjc.a
diff --git a/libobjc2-link.patch b/libobjc2-link.patch
new file mode 100644
index 0000000..5021bbb
--- /dev/null
+++ b/libobjc2-link.patch
@@ -0,0 +1,119 @@
+--- libobjc2-1.7/CMakeLists.txt.orig   2013-06-27 13:30:41.000000000 +0200
++++ libobjc2-1.7/CMakeLists.txt        2013-09-22 08:12:30.526420422 +0200
+@@ -170,6 +170,50 @@
+       COMPILE_FLAGS "${CMAKE_OBJC_FLAGS}"
+ )
+ 
++
++
++# Currently, we actually need pthreads, but we should use the platform's 
native
++# threading implementation (we do for everything except thread-local storage)
++set(CMAKE_THREAD_PREFER_PTHREAD)
++include(FindThreads)
++set(objc_LINK_FLAGS "${objc_LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
++
++
++
++add_library(objc SHARED ${libobjc_C_SRCS} ${libobjc_ASM_SRCS} 
${libobjc_OBJC_SRCS} ${libobjc_CXX_SRCS})
++
++set_target_properties(objc PROPERTIES
++      LINKER_LANGUAGE C
++      SOVERSION ${libobjc_VERSION}
++      OUTPUT_NAME ${LIBOBJC_NAME}
++      LINK_FLAGS "${objc_LINK_FLAGS}"
++      )
++
++
++set(BUILD_STATIC_LIBOBJC false CACHE BOOL
++      "Build the static version of libobjc")
++if (BUILD_STATIC_LIBOBJC)
++      add_library(objc-static STATIC ${libobjc_C_SRCS} ${libobjc_ASM_SRCS} 
${libobjc_OBJC_SRCS} ${libobjc_CXX_SRCS})
++      set_target_properties(objc-static PROPERTIES
++              POSITION_INDEPENDENT_CODE true
++              OUTPUT_NAME ${LIBOBJC_NAME})
++      list(APPEND INSTALL_TARGETS objc-static)
++endif ()
++
++
++
++# Explicitly link the C++ runtime and libgc if we are compiling with gc 
support.
++target_link_libraries(objc ${CXX_RUNTIME})
++if (LIBGC)
++      target_link_libraries(objc ${LIBGC})
++endif ()
++
++# Link libdispatch if available (we'll miss symbols for toydispatch otherwise)
++find_library(LIBDISPATCH dispatch)
++if (LIBDISPATCH)
++      target_link_libraries(objc ${LIBDISPATCH})
++endif ()
++
+ #
+ # C++ Runtime interaction
+ #
+@@ -206,7 +250,7 @@
+                               LINKER_LANGUAGE C
+                               SOVERSION ${libobjc_VERSION}
+                               )
+-                      target_link_libraries(objcxx ${CXX_RUNTIME})
++                      target_link_libraries(objcxx objc ${CXX_RUNTIME})
+                       set(CXX_RUNTIME "")
+                       list(APPEND INSTALL_TARGETS objcxx)
+               else ()
+@@ -222,55 +266,12 @@
+                       LINKER_LANGUAGE C
+                       SOVERSION ${libobjc_VERSION}
+                       )
++              target_link_libraries(objcxx objc)
+               set(CXX_RUNTIME "")
+               list(APPEND INSTALL_TARGETS objcxx)
+       endif ()
+ endif (ENABLE_OBJCXX)
+ 
+-
+-
+-# Currently, we actually need pthreads, but we should use the platform's 
native
+-# threading implementation (we do for everything except thread-local storage)
+-set(CMAKE_THREAD_PREFER_PTHREAD)
+-include(FindThreads)
+-set(objc_LINK_FLAGS "${objc_LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
+-
+-
+-
+-add_library(objc SHARED ${libobjc_C_SRCS} ${libobjc_ASM_SRCS} 
${libobjc_OBJC_SRCS} ${libobjc_CXX_SRCS})
+-
+-set_target_properties(objc PROPERTIES
+-      LINKER_LANGUAGE C
+-      SOVERSION ${libobjc_VERSION}
+-      OUTPUT_NAME ${LIBOBJC_NAME}
+-      LINK_FLAGS "${objc_LINK_FLAGS}"
+-      )
+-
+-
+-set(BUILD_STATIC_LIBOBJC false CACHE BOOL
+-      "Build the static version of libobjc")
+-if (BUILD_STATIC_LIBOBJC)
+-      add_library(objc-static STATIC ${libobjc_C_SRCS} ${libobjc_ASM_SRCS} 
${libobjc_OBJC_SRCS} ${libobjc_CXX_SRCS})
+-      set_target_properties(objc-static PROPERTIES
+-              POSITION_INDEPENDENT_CODE true
+-              OUTPUT_NAME ${LIBOBJC_NAME})
+-      list(APPEND INSTALL_TARGETS objc-static)
+-endif ()
+-
+-
+-
+-# Explicitly link the C++ runtime and libgc if we are compiling with gc 
support.
+-target_link_libraries(objc ${CXX_RUNTIME})
+-if (LIBGC)
+-      target_link_libraries(objc ${LIBGC})
+-endif ()
+-
+-# Link libdispatch if available (we'll miss symbols for toydispatch otherwise)
+-find_library(LIBDISPATCH dispatch)
+-if (LIBDISPATCH)
+-      target_link_libraries(objc ${LIBDISPATCH})
+-endif ()
+-
+ #
+ # Installation
+ #
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libobjc2.git/commitdiff/c075f6dc846de197694335bca9ad2ca066fc8c32

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to