Bug#752103: [x264] Modify the control file for building without libav etc

2014-10-07 Thread Johannes Schauer
Control: block -1 by 763766

Hi,

On Thu, 19 Jun 2014 18:50:25 +0300 Peter Pentchev r...@ringlet.net wrote:
 As promised, here's the second set of patches for the bootstrap build of x264
 without the libavformat, libffms2 and libgpac.  It adds the appropriate
 annotations to the control file so that the build tools (dpkg-dev, debhelper,
 sbuild) will know that a stage1 build does not need all the build
 dependencies and should not generate all the binary packages.

the syntax for the Build-Profiles field was changed during the bootstrap
sprint in paris [1,2]. Attached patch is updated to reflect those changes.
It only changes debian/control.in so please regenerate debian/control.

As the patch requires debhelper to understand the new syntax, this bug is
blocked by that bug in debhelper.

cheers, josch

[1] https://wiki.debian.org/Sprints/2014/BootstrapSprint
[2] https://wiki.debian.org/BuildProfileSpec
diff -Nru x264-0.142.2431+gita5831aa/debian/changelog x264-0.142.2431+gita5831aa/debian/changelog
--- x264-0.142.2431+gita5831aa/debian/changelog	2014-07-11 03:21:53.0 +0200
+++ x264-0.142.2431+gita5831aa/debian/changelog	2014-10-07 10:38:08.0 +0200
@@ -1,3 +1,21 @@
+x264 (2:0.142.2431+gita5831aa-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * To avoid a circular build dependency, do not build depend on
+libavformat-dev, libffms2-dev and libgpac-dev and do not build the x264
+package when building the stage1 profile. To that end:
+   - add build profile annotations to Build-Depends
+   - add Build-Profiles field so that only the library is built in the
+ stage1 build profile
+   - add --disable-avs --disable-ffms --disable-gpac to common_confflags
+ when building with stage1
+   - depend on the proper versions of debhelper and dpkg-dev for parsing
+ build profile information in debian/control
+Based on patch by Peter Pentchev
+Closes: #752103
+
+ -- Johannes Schauer j.scha...@email.de  Tue, 07 Oct 2014 10:32:26 +0200
+
 x264 (2:0.142.2431+gita5831aa-1) unstable; urgency=low
 
   * Update to new upstream snapshot
diff -Nru x264-0.142.2431+gita5831aa/debian/confflags x264-0.142.2431+gita5831aa/debian/confflags
--- x264-0.142.2431+gita5831aa/debian/confflags	2014-07-11 03:13:07.0 +0200
+++ x264-0.142.2431+gita5831aa/debian/confflags	2014-10-07 10:27:55.0 +0200
@@ -20,6 +20,10 @@
 
 common_confflags += --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
 
+ifneq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
+common_confflags += --disable-avs --disable-ffms --disable-gpac
+endif
+
 # XXX why isn't --enable-visualize used in the static build?
 # TODO --disable-asm when we build an opt flavor?
 static_confflags += \
diff -Nru x264-0.142.2431+gita5831aa/debian/control.in x264-0.142.2431+gita5831aa/debian/control.in
--- x264-0.142.2431+gita5831aa/debian/control.in	2014-07-11 03:13:07.0 +0200
+++ x264-0.142.2431+gita5831aa/debian/control.in	2014-10-07 10:32:05.0 +0200
@@ -7,11 +7,12 @@
  Fabian Greffrath fabian+deb...@greffrath.com,
  Rico Tzschichholz ric...@ubuntu.com
 Build-Depends:
- debhelper (= 8.1.3~),
+ debhelper (= 9.FIXME),
  autotools-dev,
- libavformat-dev (= 6:9),
- libffms2-dev,
- libgpac-dev (= 0.5.0+svn4288~),
+ dpkg-dev (= 1.17.14),
+ libavformat-dev (= 6:9) !stage1,
+ libffms2-dev !stage1,
+ libgpac-dev (= 0.5.0+svn4288~) !stage1,
  libx11-dev,
  yasm [any-i386 any-amd64]
 Standards-Version: 3.9.5
@@ -22,6 +23,7 @@
 Package: x264
 Section: graphics
 Architecture: any
+Build-Profiles: !stage1
 Depends:
  ${misc:Depends},
  ${shlibs:Depends}
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#752103: [x264] Modify the control file for building without libav etc

2014-06-19 Thread Peter Pentchev
Source: x264
Version: 2:0.142.2412+gitd7e6896-1
Severity: wishlist
Tags: patch

Hi,

As promised, here's the second set of patches for the bootstrap build of
x264 without the libavformat, libffms2 and libgpac.  It adds the
appropriate annotations to the control file so that the build tools
(dpkg-dev, debhelper, sbuild) will know that a stage1 build does not
need all the build dependencies and should not generate all the binary
packages.

If anything should go wrong with the patch, it is also available at
https://gitorious.org/roam-debian-bootstrap/x264-debian/commits/roam-stage1-control

Thanks in advance for your time and your work on Debian!

G'luck,
Peter

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org p.penc...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
From 7b4de3e3f771487b014c37972576d85897220d86 Mon Sep 17 00:00:00 2001
From: Peter Pentchev r...@ringlet.net
Date: Thu, 19 Jun 2014 17:02:06 +0300
Subject: [PATCH 1/4] Use build profile annotations in the control file.

Use !profile.stage1 for the libraries to be dropped and
Build-Profile: !stage1 for the x264 binary package.  Consequently,
drop all the rules file changes, since debhelper can figure out that
the x264 package is not to be built now.

Since debhelper now sees libx264 as the first binary package, make sure
that it doesn't install the README.Debian file there.  OK, well, maybe
it would be more correct to always install it there, but that's up to
the x264 maintainers.
---
 debian/README.Debian  | 10 --
 debian/control.in |  8 
 debian/rules  | 12 +++-
 debian/x264.README.Debian | 10 ++
 4 files changed, 17 insertions(+), 23 deletions(-)
 delete mode 100644 debian/README.Debian
 create mode 100644 debian/x264.README.Debian

diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 5f29696..000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,10 +0,0 @@
-This package ships non-PIC code in shared objects in the i386 variant
-
-The reason is that x264 uses a lot of hand written assembler that is not
-relocatable for performance reasons. Writing the assembler code in a way
-that is becomes relocatable is unfeasible.
-
-Upstream takes care to use non-pic code only on architectures that
-support this.
-
- -- Reinhard Tartler siret...@tauware.de, Fri, 10 Feb 2012 21:30:39 +0100
diff --git a/debian/control.in b/debian/control.in
index 770a83f..76be83d 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -6,13 +6,12 @@ Uploaders:
  Reinhard Tartler siret...@tauware.de,
  Fabian Greffrath fabian+deb...@greffrath.com,
  Rico Tzschichholz ric...@ubuntu.com
-# In the stage1 build profile, drop the libavformat-dev, libffms2-dev and 
libgpac-dev dependencies.
 Build-Depends:
  debhelper (= 8.1.3~),
  autotools-dev,
- libavformat-dev (= 6:9),
- libffms2-dev,
- libgpac-dev (= 0.5.0+svn4288~),
+ libavformat-dev (= 6:9) !profile.stage1,
+ libffms2-dev !profile.stage1,
+ libgpac-dev (= 0.5.0+svn4288~) !profile.stage1,
  yasm [any-i386 any-amd64]
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/pkg-multimedia/x264.git
@@ -22,6 +21,7 @@ Homepage: http://www.videolan.org/developers/x264.html
 Package: x264
 Section: graphics
 Architecture: any
+Build-Profiles: !stage1
 Depends:
  ${misc:Depends},
  ${shlibs:Depends}
diff --git a/debian/rules b/debian/rules
index f991ef3..ad922e5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,19 +7,13 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture 
-qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_HOST_GNU_CPU?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
 
-ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
-dh_exclude=
-else
-dh_exclude=-Nx264
-endif
-
 include debian/confflags
 
 DH_INSTALL_FILES = debian/$(libx264N).install \
debian/libx264-dev.install
 
 %:
-   dh $@ --parallel --with autotools_dev $(dh_exclude)
+   dh $@ --parallel --with autotools_dev
 
 .PHONY: debian/control
 debian/control:
@@ -74,10 +68,10 @@ override_dh_auto_install:
 override_dh_auto_clean: debian/control
rm -rf debian/install
$(MAKE) -o config.mak distclean
-   dh_clean config.mak2 $(DH_INSTALL_FILES) $(dh_exclude)
+   dh_clean config.mak2 $(DH_INSTALL_FILES)
 
 override_dh_install: $(DH_INSTALL_FILES)
-   dh_install --list-missing --sourcedir=debian/install $(dh_exclude)
+   dh_install --list-missing --sourcedir=debian/install
 ifeq ($(do_opt),yes)
mkdir -p debian/$(libx264N)$(opt_libdir)
cp -a