[med-svn] r7687 - in trunk/packages/gdcm/trunk/debian: . patches

Mathieu Malaterre malat-guest at alioth.debian.org
Tue Sep 6 14:01:50 UTC 2011


Author: malat-guest
Date: 2011-09-06 14:01:50 +0000 (Tue, 06 Sep 2011)
New Revision: 7687

Added:
   trunk/packages/gdcm/trunk/debian/patches/removedocfromall.patch
   trunk/packages/gdcm/trunk/debian/patches/toplevelskip.patch
Modified:
   trunk/packages/gdcm/trunk/debian/compat
   trunk/packages/gdcm/trunk/debian/control
   trunk/packages/gdcm/trunk/debian/patches/series
   trunk/packages/gdcm/trunk/debian/rules
Log:
redo the debian/rules of gdcm. Was becoming too messy.

Modified: trunk/packages/gdcm/trunk/debian/compat
===================================================================
--- trunk/packages/gdcm/trunk/debian/compat	2011-09-06 13:26:21 UTC (rev 7686)
+++ trunk/packages/gdcm/trunk/debian/compat	2011-09-06 14:01:50 UTC (rev 7687)
@@ -1 +1 @@
-7
+8

Modified: trunk/packages/gdcm/trunk/debian/control
===================================================================
--- trunk/packages/gdcm/trunk/debian/control	2011-09-06 13:26:21 UTC (rev 7686)
+++ trunk/packages/gdcm/trunk/debian/control	2011-09-06 14:01:50 UTC (rev 7687)
@@ -6,7 +6,7 @@
 Uploaders: Mathieu Malaterre <mathieu.malaterre at gmail.com>,
  Andreas Tille <tille at debian.org>,
  Steve M. Robbins <smr at debian.org>
-Build-Depends: debhelper (>= 7), python-dev, quilt, libvtk-java,
+Build-Depends: debhelper (>= 8), python-dev, quilt, libvtk-java, pvrg-jpeg
  python-support (>= 0.5.3), uuid-dev, zlib1g-dev, libexpat-dev, doxygen-latex,
  swig, cmake, libvtk5-dev, python-vtk, libpng-dev, libcharls-dev,
  libjpeg-dev, libtiff-dev, libfreetype6-dev, libopenjpeg-dev, graphviz,

Added: trunk/packages/gdcm/trunk/debian/patches/removedocfromall.patch
===================================================================
--- trunk/packages/gdcm/trunk/debian/patches/removedocfromall.patch	                        (rev 0)
+++ trunk/packages/gdcm/trunk/debian/patches/removedocfromall.patch	2011-09-06 14:01:50 UTC (rev 7687)
@@ -0,0 +1,19 @@
+Index: gdcm-2.0.18/Utilities/doxygen/CMakeLists.txt
+===================================================================
+--- gdcm-2.0.18.orig/Utilities/doxygen/CMakeLists.txt	2011-09-06 15:47:50.000000000 +0200
++++ gdcm-2.0.18/Utilities/doxygen/CMakeLists.txt	2011-09-06 15:48:05.000000000 +0200
+@@ -139,14 +139,12 @@
+     )
+     # add target to 'ALL'
+     ADD_CUSTOM_TARGET(GDCMDoxygenPDF
+-      ALL
+       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/latex/gdcm-${GDCM_VERSION}.pdf
+       COMMENT  "GDCM: Executing GDCMDoxygenPDF"
+     )
+   ELSE(UNIX AND GDCM_PDF_DOCUMENTATION)
+     # make DoxygenDoc depends on the final tarball thus all file are garantee to be generated
+     ADD_CUSTOM_TARGET(GDCMDoxygenDoc
+-      ALL
+       DEPENDS ${GDCM_DOC_TARBALL}
+       COMMENT  "GDCM: Executing GDCMDoxygenDoc"
+     )

Modified: trunk/packages/gdcm/trunk/debian/patches/series
===================================================================
--- trunk/packages/gdcm/trunk/debian/patches/series	2011-09-06 13:26:21 UTC (rev 7686)
+++ trunk/packages/gdcm/trunk/debian/patches/series	2011-09-06 14:01:50 UTC (rev 7687)
@@ -1,3 +1,5 @@
 remove_gdcm2pnm.patch
 addvtkgdcmjavaclasspath.patch
 fixsitepackage.patch
+toplevelskip.patch
+removedocfromall.patch

Added: trunk/packages/gdcm/trunk/debian/patches/toplevelskip.patch
===================================================================
--- trunk/packages/gdcm/trunk/debian/patches/toplevelskip.patch	                        (rev 0)
+++ trunk/packages/gdcm/trunk/debian/patches/toplevelskip.patch	2011-09-06 14:01:50 UTC (rev 7687)
@@ -0,0 +1,15 @@
+Index: gdcm-2.0.18/CMakeLists.txt
+===================================================================
+--- gdcm-2.0.18.orig/CMakeLists.txt	2011-09-06 15:26:11.000000000 +0200
++++ gdcm-2.0.18/CMakeLists.txt	2011-09-06 15:26:26.000000000 +0200
+@@ -31,8 +31,8 @@
+ GET_FILENAME_COMPONENT(PARENTDIR ${GDCM_BINARY_DIR} PATH)
+ STRING(COMPARE EQUAL "${GDCM_SOURCE_DIR}" "${PARENTDIR}" INSOURCESUBDIR)
+ IF(INSOURCE OR INSOURCESUBDIR)
+-  MESSAGE(FATAL_ERROR "GDCM requires an out of source Build. "
+-    "Please create a separate binary directory and run CMake there.")
++#  MESSAGE(FATAL_ERROR "GDCM requires an out of source Build. "
++#    "Please create a separate binary directory and run CMake there.")
+ ENDIF(INSOURCE OR INSOURCESUBDIR)
+ 
+ #-----------------------------------------------------------------------------

Modified: trunk/packages/gdcm/trunk/debian/rules
===================================================================
--- trunk/packages/gdcm/trunk/debian/rules	2011-09-06 13:26:21 UTC (rev 7686)
+++ trunk/packages/gdcm/trunk/debian/rules	2011-09-06 14:01:50 UTC (rev 7687)
@@ -1,83 +1,23 @@
 #!/usr/bin/make -f
-# Based on the multi2 sample debian/rules file:
-# ---
-# Sample debian/rules that uses debhelper.
-# This file is public domain software, originally written by Joey Hess.
-#
-# This version is for a multibinary package. It also allows you to build any
-# of the binary packages independantly, via binary-<package> targets.
-# ---
 
-include /usr/share/quilt/quilt.make
-
-VER_MAJOR = 2
-VER_MINOR = 0
-VER_PATCH = 18
-
-VER_FULL = $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
-SOVERSION = $(VER_MAJOR).$(VER_MINOR)
-
-UPSTREAM_SRC = gdcm-$(VER_FULL)
-DEBIAN_SRC_DIR = gdcm-$(VER_FULL)
-DEBIAN_SRC_TAR = gdcm_$(VER_FULL).orig.tar.gz
-
 # Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+%:
+	dh $@ --parallel
 
-# Debian CLI Policy ยง4.3 [0]
-# -include /usr/share/cli-common/cli.make
-export MONO_DISABLE_SHM=1
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
-
-CFLAGS = -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-export CFLAGS
-
-# Mono architectures:
-# Mono is not available for all Debian architectures. It supports all except:
-# m68k, hppa and alpha.
+# Mono is not available for all Debian architectures.
 DEB_WRAP_CSHARP = 1
 ifneq (,$(filter m68k alpha hppa mips mipsel ,$(DEB_BUILD_ARCH)))
   DEB_WRAP_CSHARP = 0
   SKIP_ME = -Xsharp
 endif
 
-# set the number of build jobs
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-        JOBS := -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-endif
-
 # export JAVA_HOME because upstream CMake uses it
-export JAVA_HOME=/usr/lib/jvm/default-java
+#export JAVA_HOME=/usr/lib/jvm/default-java
 
-SRC	:= $(CURDIR)
-BUILD	:= $(CURDIR)/debian/build
-TARGET	:= $(CURDIR)/debian/tmp
-
-PYVERS  := $(shell pyversions -vr)
-PYMODDIR := /usr/lib/$(shell pyversions -r)
-
-debian/configure-stamp: $(PYVERS:%=debian/configure-python%-stamp)
-	touch $@
-
-debian/configure-python%-stamp: $(QUILT_STAMPFN)
-	dh_testdir
-	[ -d $(BUILD)-python$* ] || mkdir $(BUILD)-python$*
-	cd $(BUILD)-python$* && cmake $(CURDIR) -DCMAKE_INSTALL_PREFIX="/usr" \
-		-DCMAKE_SKIP_RPATH=ON \
+PYVER = $(shell pyversions -dv)
+extra_flags += -DCMAKE_SKIP_RPATH=ON \
 		-DGDCM_NO_EXECUTABLE_PROPERTIES=ON \
 		-DCMAKE_VERBOSE_MAKEFILE=$(DH_VERBOSE) \
 		-DGDCM_BUILD_APPLICATIONS=ON \
@@ -87,8 +27,9 @@
 		-DGDCM_WRAP_PYTHON=ON \
 		-DGDCM_WRAP_CSHARP=$(DEB_WRAP_CSHARP) \
 		-DGDCM_WRAP_JAVA=ON \
+		-DGDCM_USE_PVRG=ON \
+		-DGDCM_USE_SYSTEM_PVRG=ON \
 		-DGMCS_EXECUTABLE:FILEPATH=/usr/bin/mono-csc \
-		-DDESIRED_CSHARP_COMPILER_VERSION=2 \
 		-DGDCM_BUILD_TESTING:BOOL=OFF \
 		-DCMAKE_BUILD_TYPE:STRING=Release \
 		-DGDCM_USE_SYSTEM_EXPAT:BOOL=ON \
@@ -101,90 +42,12 @@
 		-DGDCM_USE_PARAVIEW:BOOL=OFF \
 		-DGDCM_VTK_JAVA_JAR:FILEPATH=/usr/share/java/vtk.jar \
 		-DGDCM_USE_VTK:BOOL=ON
-	touch $@
 
-build: debian/build-stamp
+override_dh_auto_configure:
+	dh_auto_configure -- $(extra_flags)
 
-debian/build-stamp: $(PYVERS:%=debian/build-python%-stamp)
-	touch $@
+build-indep:
+	$(MAKE) GDCMDoxygenDoc
 
-debian/build-python%-stamp: debian/configure-stamp
-	dh_testdir
-	$(MAKE) $(JOBS) -C $(BUILD)-python$*
-	-(cd $(BUILD)-python$* && LD_LIBRARY_PATH=$(BUILD)-python$*/gdcm ctest --force-new-ctest-process -V)
-	touch $@
-
-clean: unpatch
-	dh_testdir
-	dh_testroot
-	rm -f debian/configure*stamp debian/build*stamp
-	rm -rf debian/build*
-	dh_clean
-
-install: DH_OPTIONS=
-install: debian/build-stamp install-common $(PYVERS:%=install-python%)
-install-common:
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-
-install-python%:
-	$(MAKE) $(JOBS) -C $(BUILD)-python$* install DESTDIR=$(TARGET)
-
-	# correct location of python-gdcm files
-	mv $(TARGET)/usr/lib/python $(TARGET)/$(PYMODDIR)
-
-# This single target is used to build all the packages, all at once, or
-# one at a time. So keep in mind: any options passed to commands here will
-# affect _all_ packages. Anything you want to only affect one package
-# should be put in another target, such as the install target.
-binary-common:
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs
-	dh_installdocs
-	dh_installexamples
-	dh_installmenu
-	dh_installman
-	dh_lintian
-	dh_install --sourcedir=$(TARGET) --fail-missing
-	dh_strip --dbg-package=libgdcm2.0-dbg
-	dh_link
-	dh_compress
-	dh_fixperms
-	dh_pysupport
-	dh_makeshlibs -Xformats -V
-	dh_installdeb
-	LD_LIBRARY_PATH="/usr/lib/jni$${LD_LIBRARY_PATH:+:}$$LD_LIBRARY_PATH" dh_shlibdeps -v -a -l /usr/lib/jvm/default-java/lib
-#	dh_makeclilibs
-	dh_clideps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-# Build architecture independant packages using the common target.
-binary-indep: install
-# (Uncomment this next line if you have such packages.)
-#	 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
-build-arch: build
-build-indep: build
-
-# Build architecture dependant packages using the common target.
-binary-arch: install
-	$(MAKE) -f $(SRC)/debian/rules DH_OPTIONS=-s binary-common
-
-# Any other binary targets build just one binary package at a time.
-binary-%: install
-	make -f $(SRC)/debian/rules binary-common DH_OPTIONS=-p$*
-
-$(UPSTREAM_SRC).tar.gz:
-	wget http://voxel.dl.sourceforge.net/sourceforge/gdcm/$@
-
-get-orig-source: $(UPSTREAM_SRC).tar.gz
-	tar xzf $(UPSTREAM_SRC).tar.gz
-	GZIP="--best --no-name" tar czf $(DEBIAN_SRC_TAR) $(DEBIAN_SRC_DIR)
-	rm -rf $(DEBIAN_SRC_DIR)
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary-common binary install install-common
+build-arch:
+	$(MAKE)




More information about the debian-med-commit mailing list