rpms/CGAL/devel CGAL-3.2.1-config.h-endianness_detection.patch, NONE, 1.1 CGAL-3.2.1-install_cgal-no_versions_in_compiler_config.h.patch, NONE, 1.1 CGAL-README.Fedora, NONE, 1.1 CGAL-build-library.dpatch, NONE, 1.1 CGAL-install_cgal-SUPPORT_REQUIRED.patch, NONE, 1.1 CGAL.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Laurent Rineau (rineau) fedora-extras-commits at redhat.com
Mon Sep 11 09:34:00 UTC 2006


Author: rineau

Update of /cvs/extras/rpms/CGAL/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2353/devel

Modified Files:
	.cvsignore sources 
Added Files:
	CGAL-3.2.1-config.h-endianness_detection.patch 
	CGAL-3.2.1-install_cgal-no_versions_in_compiler_config.h.patch 
	CGAL-README.Fedora CGAL-build-library.dpatch 
	CGAL-install_cgal-SUPPORT_REQUIRED.patch CGAL.spec 
Log Message:
auto-import CGAL-3.2.1-15.fc5 on branch devel from CGAL-3.2.1-15.fc5.src.rpm

CGAL-3.2.1-config.h-endianness_detection.patch:

--- NEW FILE CGAL-3.2.1-config.h-endianness_detection.patch ---
--- CGAL-3.2.1/include/CGAL/config.h.orig	2006-07-13 21:01:20.000000000 +0200
+++ CGAL-3.2.1/include/CGAL/config.h	2006-08-17 15:56:40.000000000 +0200
@@ -103,12 +103,26 @@
 
 // Big endian or little endian machine.
 // ====================================
-#ifdef CGAL_CFG_NO_BIG_ENDIAN
+
+// We used to have a config program for this, but it
+// is much more convenient to use the preprocessor.
+#if defined(__sparc) || defined(__sparc__) \
+   || defined(_POWER) || defined(__powerpc__) \
+   || defined(__ppc__) || defined(__hppa) \
+   || defined(_MIPSEB) || defined(_POWER) \
+   || defined(__s390__)
+#  define CGAL_BIG_ENDIAN
+#elif defined(__i386__) || defined(__alpha__) \
+   || defined(__x86_64) || defined(__x86_64__) \
+   || defined(__ia64) || defined(__ia64__) \
+   || defined(_M_IX86) || defined(_M_IA64) \
+   || defined(_M_ALPHA)
 #  define CGAL_LITTLE_ENDIAN
 #else
-#  define CGAL_BIG_ENDIAN
+#  error Unknown endianness
 #endif
 
+
 #ifndef CGAL_USE_LEDA
 #  define CGAL_USE_CGAL_WINDOW
 #endif

CGAL-3.2.1-install_cgal-no_versions_in_compiler_config.h.patch:

--- NEW FILE CGAL-3.2.1-install_cgal-no_versions_in_compiler_config.h.patch ---
--- CGAL-3.2.1/install_cgal.orig	2006-08-17 15:47:05.000000000 +0200
+++ CGAL-3.2.1/install_cgal	2006-08-17 16:06:47.000000000 +0200
@@ -3161,7 +3161,6 @@
 	        "----------------" \
 	        >> ${_file}
             ${_printf} "%s\n" "#ifndef CGAL_NO_${totest}" >> ${_file}
-	    ${_printf} "%s\n" "#define CGAL_${totest}_VERSION 0" >> ${_file}
 	    ${_printf} "%s\n" "//#define CGAL_USE_${totest} 1" >> ${_file}
             ${_printf} "%s\n\n" "#endif // ! CGAL_NO_${totest}" >> ${_file}
         done
@@ -3221,10 +3220,6 @@
 	else
 	    replace_line "${_file}" "${_tmp2}" "${_tmp3}"
 	fi
-	_tmp2="${totest}_VERSION"
-	_tmp3="`value_of ${_tmp2}`"
-	replace_line "${_file}" "#define CGAL_${_tmp2}" \
-          "#define CGAL_${_tmp2} ${_tmp3:-0}"
     done
 
     cd "${CGAL_DIR}"


--- NEW FILE CGAL-README.Fedora ---
The homepage of CGAL (http://www.cgal.org/) offers more information about CGAL.
In particular, a mailing list and the documentation for the library (in PDF and
HTML) are available. The authors ask you to give some feedback about your usage
of CGAL in a short questionnaire (in the download section).


Packages
--------

In Fedora, the CGAL tarball is separated in several packages:
  - CGAL-libs contains the shared libraries,
  - CGAL-devel contains header files, static libraries, and several files
  and tools needed to develop CGAL applications,
  - CGAL-demos-source contains the source of examples and demos of CGAL.

The CGAL meta-package permits to install all CGAL at once.


Documentation
-------------

Note that the CGAL documentation cannot be packaged for Fedora due to unclear
license conditions. In fact, the upstream tarball of CGAL contains the
installation instructions as PDF. Therefore, this document had to be removed
from the Fedora package. The complete documentation in PDF and HTML is
available at http://www.cgal.org/.


--- NEW FILE CGAL-build-library.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## library-soname.dpatch by Joachim Reichel <joachim.reichel at gmx.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad cgal/install_cgal cgal/install_cgal
--- cgal/install_cgal	2006-04-17 22:33:03.000000000 +0200
+++ cgal/install_cgal	2006-04-17 22:33:06.000000000 +0200
@@ -4156,7 +4156,7 @@
 	    MAKE_OPTION="${MAKE_OPTION} CXXFLAGS=\$(CGAL_SHARED_LIB_CXXFLAGS) shared_lib";;
     esac
 
-    if make ${MAKE_OPTION} >"${COMPILE_LOGFILE}" 2>&1; then
+    if make ${MAKE_OPTION} | tee "${COMPILE_LOGFILE}" 2>&1; then
 	log_print "Compilation of $1 $2 ${_libname} succeeded."
 	${_printf} "%s\n" " done."
 	ANY_LIB_COMPILED='y'
diff -urNad cgal/src/CGAL/makefile cgal/src/CGAL/makefile
--- cgal/src/CGAL/makefile	2006-04-17 22:33:03.000000000 +0200
+++ cgal/src/CGAL/makefile	2006-04-17 22:33:28.000000000 +0200
@@ -74,11 +74,14 @@
 #                    target entries
 #---------------------------------------------------------------------#
 
+SOVERSION=1.0.1
+SOMAJOR=1
+
 shared_lib: $(CGAL_OBJECTS)
-	$(CGAL_SHARED_LIB_CREATE)$(CGAL_SHARED_LIB) \
+	$(CGAL_SHARED_LIB_CREATE)$(CGAL_SHARED_LIB).$(SOVERSION) -Wl,-soname,$(CGAL_SHARED_LIB).${SOMAJOR} \
 	`ls *$(OBJ_EXT) | awk '{for (i=1; i<=NF;++i){printf "$(CGAL_OBJ_PREFIX)";print $$i}}'`\
 		$(CGAL_SHARED_LIB_LDFLAGS)
-	mv $(CGAL_SHARED_LIB) '$(CGAL_LIB_DESTINATION)'
+	mv $(CGAL_SHARED_LIB).$(SOVERSION) '$(CGAL_LIB_DESTINATION)'
 	rm $(CGAL_OBJECTS)
 
 static_lib: static_lib_no_install
@@ -99,5 +102,5 @@
 #---------------------------------------------------------------------#
 
 .cpp$(OBJ_EXT):
-	$(CGAL_CXX)  $(CXXFLAGS)  -c $<
+	$(CGAL_CXX)  $(CXXFLAGS) -D_REENTRANT -c $<
 
diff -urNad cgal/src/CGALQt/makefile cgal/src/CGALQt/makefile
--- cgal/src/CGALQt/makefile	2006-04-17 21:00:25.000000000 +0200
+++ cgal/src/CGALQt/makefile	2006-04-17 22:33:53.000000000 +0200
@@ -125,5 +125,5 @@
 	$(CGAL_CXX) $(CXXFLAGS) -c Qt_widget_OpenGL.cpp
 
 .cpp$(OBJ_EXT):
-	$(CGAL_CXX)  $(CXXFLAGS) -c $<
+	$(CGAL_CXX)  $(CXXFLAGS) -D_REENTRANT -c $<
 

CGAL-install_cgal-SUPPORT_REQUIRED.patch:

--- NEW FILE CGAL-install_cgal-SUPPORT_REQUIRED.patch ---
Index: install_cgal
===================================================================
--- install_cgal	(revision 30283)
+++ install_cgal	(working copy)
@@ -92,7 +92,7 @@
 
 # ---------------------------------------------
 # Required support options
-SUPPORT_REQUIRED='BOOST'
+SUPPORT_REQUIRED='BOOST BOOST_PROGRAM_OPTIONS X11 GMP MPFR GMPXX CORE ZLIB QT'
 
 # ---------------------------------------------------------------------
 # internal variables


--- NEW FILE CGAL.spec ---
%define boost_version 1.32

Name:           CGAL
Version:        3.2.1
Release:        15%{?dist}
Summary:        Computational Geometry Algorithms Library

Group:          System Environment/Libraries
License:        QPL/GPL
URL:            http://www.cgal.org/
Source0:        ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/%{name}-%{version}.tar.gz
Source10:       CGAL-README.Fedora
Patch1:         CGAL-install_cgal-SUPPORT_REQUIRED.patch
Patch2:         CGAL-build-library.dpatch
Patch3:         CGAL-3.2.1-config.h-endianness_detection.patch
Patch4:         CGAL-3.2.1-install_cgal-no_versions_in_compiler_config.h.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# Required packages.
BuildRequires: gmp-devel
BuildRequires: boost-devel >= %boost_version
BuildRequires: qt-devel >= 3.0
BuildConflicts:qt-devel < 4
BuildRequires: zlib-devel

# CGAL-libs is renamed to CGAL.
Obsoletes:     %{name}-libs < %{version}-%{release}
Provides:      %{name}-libs = %{version}-%{release}

%description
Libraries for CGAL applications.
CGAL is a collaborative effort of several sites in Europe and
Israel. The goal is to make the most important of the solutions and
methods developed in computational geometry available to users in
industry and academia in a C++ library. The goal is to provide easy
access to useful, reliable geometric algorithms.


%package devel
Group:          Development/Libraries
Summary:        Development files and tools for CGAL applications
Requires:       %{name} = %{version}-%{release}
Requires:       boost-devel >= %{boost_version}
Requires:       /etc/profile.d
%description devel
The %{name}-devel package provides the headers files and tools you may need to 
develop applications using CGAL.


%package demos-source
Group:          Documentation
Summary:        Examples and demos of CGAL algorithms
Requires:       %{name} = %{version}-%{release}
Obsoletes:      %{name}-demo < %{version}-%{release}
Provides:       %{name}-demo = %{version}-%{release}
%description demos-source
The %{name}-demos-source package provides the sources of examples and demos of
CGAL algorithms.


%prep
%setup -q 

%patch1 -p0
%patch2 -p1 -b .debian.build-library.back

# no hard-coded endianness: remove a test file, and use an upstream patch
rm config/testfiles/CGAL_CFG_NO_BIG_ENDIAN.C
%patch3 -p1 -b .endianness-detection.back

%patch4 -p1 -b .no_versions.back


# fix end-of-lines of several files
sed -i 's/\r//' \
    examples/Surface_mesh_parameterization/data/mask_cone.off \
    examples/Boolean_set_operations_2/test.dxf

for f in demo/Straight_skeleton_2/data/vertex_event_9.poly \
         demo/Straight_skeleton_2/data/vertex_event_0.poly;
do
  [ -r $f ] && sed -i 's/\r//' $f;
done

# README.Fedora
install -m 644 %{SOURCE10} %{_builddir}/%{name}-%{version}/README.Fedora


%build

source /etc/profile.d/qt.sh

./install_cgal -ni g++ --CUSTOM_CXXFLAGS "$RPM_OPT_FLAGS" \
               --without-autofind \
               --with-ZLIB \
               --with-BOOST \
               --with-BOOSTPROGRAMOPTIONS \
               --with-X11 \
               --with-GMP \
               --with-GMPXX \
               --with-MPFR \
               --with-CGALCORE \
               --with-QT3MT


%install
rm -rf %{buildroot}

# Install headers
mkdir -p %{buildroot}%{_includedir}
cp -a include/* %{buildroot}%{_includedir}
rm -rf %{buildroot}%{_includedir}/CGAL/config/msvc7
mv %{buildroot}%{_includedir}/CGAL/config/*/CGAL/compiler_config.h %{buildroot}%{_includedir}/CGAL/
rm -rf %{buildroot}%{_includedir}/CGAL/config

# Install scripts (only those prefixed with "cgal_").
mkdir -p %{buildroot}%{_bindir}
cp -a scripts/cgal_* %{buildroot}%{_bindir}

# Install libraries
mkdir -p %{buildroot}%{_libdir}
cp -a lib/*/lib* %{buildroot}%{_libdir}
ln -s libCGAL.so.1.0.1 %{buildroot}%{_libdir}/libCGAL.so
ln -s libCGAL.so.1.0.1 %{buildroot}%{_libdir}/libCGAL.so.1

# Install makefile:
mkdir -p %{buildroot}%{_datadir}/CGAL/make
cp -p make/makefile_* %{buildroot}%{_datadir}/CGAL/make/makefile

# Install demos and examples
cp -a demo %{buildroot}%{_datadir}/CGAL/demo
cp -a examples %{buildroot}%{_datadir}/CGAL/examples

# Modify makefile
cat > makefile.sed <<'EOF'
s,CGAL_INCL_DIR *=.*,CGAL_INCL_DIR = %{_includedir},;
s,CGAL_LIB_DIR *=.*,CGAL_LIB_DIR = %{_libdir},;
/CUSTOM_CXXFLAGS/ s/-O2 //;
/CUSTOM_CXXFLAGS/ s/-g //;
/CGAL_INCL_DIR/ s,/CGAL/config/.*,,;
s,/$(CGAL_OS_COMPILER),,g;
/-I.*CGAL_INCL_CONF_DIR/ d
EOF

sed -i -f makefile.sed %{buildroot}%{_datadir}/CGAL/make/makefile

# check if the sed script above has worked:
grep -q %{_builddir} %{buildroot}%{_datadir}/CGAL/make/makefile && false
grep -q %{buildroot} %{buildroot}%{_datadir}/CGAL/make/makefile && false
grep -q CGAL/config %{buildroot}%{_datadir}/CGAL/make/makefile && false
grep -q -E 'CUSTOM_CXXFLAGS.*(-O2|-g)' %{buildroot}%{_datadir}/CGAL/make/makefile && false

# Remove -L and -R flags from the makefile
cat > makefile-noprefix.sed <<'EOF'
/'-L$(CGAL_LIB_DIR)'/ d;
/-R$(CGAL_LIB_DIR)/ d;
/'-I$(CGAL_INCL_DIR)'/ d;
EOF

sed -i -f makefile-noprefix.sed  %{buildroot}%{_datadir}/CGAL/make/makefile

# check that the sed script has worked
grep -q -E -- '-[LI]\$' %{buildroot}%{_datadir}/CGAL/make/makefile && false
grep -q -E -- '-R' %{buildroot}%{_datadir}/CGAL/make/makefile && false


# Create /etc/profile.d/ scripts
cd %{buildroot}
mkdir -p ./etc/profile.d
cat > ./etc/profile.d/cgal.sh <<EOF
if [ -z "\$CGAL_MAKEFILE" ] ; then
  CGAL_MAKEFILE="%{_datadir}/CGAL/make/makefile"
fi
export CGAL_MAKEFILE
EOF

cat > ./etc/profile.d/cgal.csh <<EOF
if ( \$?CGAL_MAKEFILE ) then
  exit
endif
setenv CGAL_MAKEFILE "$MAKEFILE"
EOF
chmod 644 ./etc/profile.d/cgal.*sh

%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc LICENSE* README.Fedora
%{_libdir}/libCGAL.so.1
%{_libdir}/libCGAL.so.1.0.1


%files devel
%defattr(-,root,root,-)
%{_includedir}/CGAL
%{_includedir}/OpenNL
%{_includedir}/CORE
%{_libdir}/libCGALQt.a
%{_libdir}/libcore++.a
%{_libdir}/libCGAL.so
%exclude %{_libdir}/libCGAL.a
%dir %{_datadir}/CGAL/make
%config(noreplace) %{_datadir}/CGAL/make/makefile
%{_bindir}/*
/etc/profile.d/cgal.*
%doc LICENSE*


%files demos-source
%defattr(-,root,root,-)
%doc LICENSE*
%{_datadir}/CGAL/demo
%{_datadir}/CGAL/examples


%changelog
* Thu Aug 17 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-15
- Change the permissions of /etc/profile.d/cgal.*sh
- Remove the meta package CGAL. CGAL-libs is renamed CGAL.
- Added two patchs:
  - CGAL-3.2.1-config.h-endianness_detection.patch which is an upstream patch
    to fix the endianness detection, so that is is no longer hard-coded in
    <CGAL/compiler_config.h>,
  - CGAL-3.2.1-install_cgal-no_versions_in_compiler_config.h.patch that
    removes hard-coded versions in <CGAL/compiler_config.h>.

* Wed Aug 16 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-14
- Simplified spec file, for Fedora Extras.

* Mon Jul 17 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-13
- Change CGAL-README.Fedora, now that Installation.pdf is no longer in the
tarball.

* Mon Jul 17 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-12
- Remove unneeded  -R/-L/-I flags from %%{_datadir}/CGAL/make/makefile

* Mon Jul 17 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-11
- Fix the soversion.
- Fix %%{cgal_prefix} stuff!!
- Quote 'EOF', so that the lines are not expanded by the shell.

* Tue Jul  4 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-10
- Fix makefile.sed so that %%{buildroot} does not appear in 
  %%{_datadir}/CGAL/make/makefile.

* Sun Jul  2 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-9
- Remove Obsoletes: in the meta-package CGAL.

* Sun Jul  2 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-8
- Fix the localisation of demo and examples.

* Sun Jul  2 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-6
- Set Requires, in sub-packages.

* Sun Jul  2 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2.1-5
- CGAL-3.2.1
- Sub-package "demo" is now named "demos-source" (Fedora guidelines).
- Fix some rpmlint warnings
- Added README.Fedora, to explain why the documentation is not shipped, and how CGAL is divided in sub-packages.


* Sat Jul  1 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2-4
- Use %%{_datadir}/CGAL instead of %%{_datadir}/%%{name}-%%{version}
- Fix %%{_datadir}/CGAL/makefile, with a sed script.
- Added a new option %%set_prefix (see top of spec file).

* Sat Jul  1 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2-3
- Use less "*" in %%files, to avoid futur surprises.
- Remove /etc/profile.d/cgal.* from %%files if %%cgal_prefix is not empty.
- Fix %%build_doc=0 when %%fedora is set. New option macro: %%force_build_doc.

* Fri Jun 30 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2-2
- Fix some end-of-lines in %%prep, to please rpmlint.

* Mon May 22 2006 Laurent Rineau <laurent.rineau__fedora_extras at normalesup.org> - 3.2-1
- Remove README from %%doc file: it describes the tarball layout.
- Updated to CGAL-3.2.
- Added examples in the -demo subpackage.
- Cleaning up, to follow Fedora Guidelines.
- The -doc subpackage cannot be build on Fedora (no license).
- Add ldconfig back.
- No prefix.

* Fri Apr 28 2006 Laurent Rineau <laurent.rineau__fc_extra at normalesup.org> - 3.2-0.447
- Update to CGAL-3.2-447.

* Fri Apr 21 2006 Laurent Rineau <laurent.rineau__fc_extra at normalesup.org> - 3.2-0.440
- Updated to CGAL-3.2-I-440.

* Wed Apr 19 2006 Laurent Rineau <laurent.rineau__fc_extra at normalesup.org> - 3.2-0.438
- Added a patch to install_cgal, to require support for BOOST, BOOST_PROGRAM_OPTIONS, X11, GMP, MPFR, GMPXX, CORE, ZLIB, and QT.
- Move scripts to %%{_bindir}
- %%{_libdir}/CGAL-I now belong to CGAL and CGAL-devel, so that it disappears when the packages are removed.

* Wed Apr 12 2006 Laurent Rineau <laurent.rineau__fc_extra at normalesup.org> - 3.2-0.431
- Updated to CGAL-3.2-I-431.
- Remove the use of ldconfig.
- Changed my email address.
- No longer need for patch0.
- Pass of rpmlint.
- Remove unneeded Requires: tags (rpm find them itself).
- Change the release tag.
- Added comments at the beginning of the file.
- Added custom ld flags, on 64bits archs (so that X11 is detected).

* Tue Apr 11 2006 Laurent Rineau <laurent.rineau__fc_extra at normalesup.org>
- Removed -g and -O2 from CUSTOM_CXXFLAGS, in the makefile only.
  They are kept during the compilation of libraries.
- Added zlib in dependencies.
- Added a patch to test_ZLIB.C, until it is merged upstream.

* Fri Mar 31 2006 Naceur MESKINI <nmeskini at sophia.inria.fr>
- adding a test in the setup section.

* Mon Mar 13 2006 Naceur MESKINI <nmeskini at sophia.inria.fr>
- delete the patch that fixes the perl path.
- add build_doc and build_demo flags.

* Fri Mar 10 2006 Naceur MESKINI <nmeskini at sophia.inria.fr>
- Adding new sub-packages doc(pdf&html) and demo.
- Add internal_release flag. 

* Thu Mar 09 2006 Naceur MESKINI <nmeskini at sophia.inria.fr>
- Cleanup a specfile.



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/CGAL/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	11 Sep 2006 09:32:47 -0000	1.1
+++ .cvsignore	11 Sep 2006 09:34:00 -0000	1.2
@@ -0,0 +1 @@
+CGAL-3.2.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/CGAL/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	11 Sep 2006 09:32:47 -0000	1.1
+++ sources	11 Sep 2006 09:34:00 -0000	1.2
@@ -0,0 +1 @@
+82c98d44aa88d1154631f266e85d3b35  CGAL-3.2.1.tar.gz




More information about the scm-commits mailing list