backported patch from pwlib cvs, makes it possible to use gnomemeeting w/ alsa+dmix...
authorStefan Knoblich <stkn@gentoo.org>
Tue, 30 Nov 2004 22:59:27 +0000 (22:59 +0000)
committerStefan Knoblich <stkn@gentoo.org>
Tue, 30 Nov 2004 22:59:27 +0000 (22:59 +0000)
dev-libs/pwlib/ChangeLog
dev-libs/pwlib/Manifest
dev-libs/pwlib/files/digest-pwlib-1.6.6-r1 [new file with mode: 0644]
dev-libs/pwlib/files/pwlib-1.6.6-alsa_dmix.diff [new file with mode: 0644]
dev-libs/pwlib/pwlib-1.6.6-r1.ebuild [new file with mode: 0644]

index c318dc42fefc0df87d4c6868b2507dc9a722a8e5..bdfdd9f7f4442a35cd11ecc0a05cce6da4506007 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for dev-libs/pwlib
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/pwlib/ChangeLog,v 1.65 2004/11/09 10:32:13 kloeri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/pwlib/ChangeLog,v 1.66 2004/11/30 22:59:27 stkn Exp $
+
+*pwlib-1.6.6-r1 (30 Nov 2004)
+
+  30 Nov 2004; <stkn@gentoo.org> +files/pwlib-1.6.6-alsa_dmix.diff,
+  +pwlib-1.6.6-r1.ebuild:
+  backported patch makes it possible to use gnomemeeting (and other apps)
+  to use alsa+dmix for sound output, thx to Benoit Chesneau <bchesneau@gmail.com>
 
   09 Nov 2004; Bryan Ã˜stergaard <kloeri@gentoo.org> pwlib-1.6.6.ebuild:
   ~alpha keyword.
index 85f46dc20ebea55d3545b79c894246b22cdaa2b1..003e20da04ee30e8608a75a1859c27073ef64c08 100644 (file)
@@ -1,40 +1,33 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 0b165d3dab2c13782ff4c738cd7f60d9 pwlib-1.5.0-r1.ebuild 2403
-MD5 8dbc8816810f569b5bec54514e1177d8 pwlib-1.5.2.ebuild 2596
-MD5 a296ccbbfc11727eaf0b808d5136ad74 ChangeLog 10160
-MD5 1e445af737490687247c95904ad89f24 pwlib-1.3.11-r1.ebuild 1834
 MD5 0a7cb3a48c160df6883e6d0c53b3d38b pwlib-1.5.2-r3.ebuild 2997
-MD5 e7e31f6f265883cdf48d812f42a9f856 metadata.xml 235
-MD5 d269c9360d97e70bb97c3bad3b93f3fc pwlib-1.4.11.ebuild 2159
+MD5 8b70577b20889bedf2ac29783444d4ba pwlib-1.6.6-r1.ebuild 4171
+MD5 8dbc8816810f569b5bec54514e1177d8 pwlib-1.5.2.ebuild 2596
+MD5 0c85c6b3395f056fd849c9ae7eb71ed2 pwlib-1.5.2-r2.ebuild 2955
 MD5 ad68150136005ec2407691456e990fa3 pwlib-1.6.3-r1.ebuild 3980
-MD5 11fdff875833c3f2d42f94517d1b4774 pwlib-1.6.3-r2.ebuild 3948
+MD5 e7e31f6f265883cdf48d812f42a9f856 metadata.xml 235
+MD5 1e445af737490687247c95904ad89f24 pwlib-1.3.11-r1.ebuild 1834
 MD5 5031238591ce3de615c5e0bf256103cf pwlib-1.6.6.ebuild 4088
+MD5 ad3bfe53d49207f0f6b1e29473002e4d ChangeLog 10440
+MD5 bbcfc0106fe98eae9b5a6327850ea97f pwlib-1.5.0.ebuild 2308
+MD5 d269c9360d97e70bb97c3bad3b93f3fc pwlib-1.4.11.ebuild 2159
 MD5 36ce467ec9ddfceb3ab08750dde508c2 pwlib-1.5.2-r1.ebuild 2760
+MD5 11fdff875833c3f2d42f94517d1b4774 pwlib-1.6.3-r2.ebuild 3948
+MD5 0b165d3dab2c13782ff4c738cd7f60d9 pwlib-1.5.0-r1.ebuild 2403
 MD5 21199978809de871ebcfbedc9bdedca8 pwlib-1.6.3.ebuild 3806
-MD5 bbcfc0106fe98eae9b5a6327850ea97f pwlib-1.5.0.ebuild 2308
-MD5 0c85c6b3395f056fd849c9ae7eb71ed2 pwlib-1.5.2-r2.ebuild 2955
-MD5 0a9a8c5a1417127269e2e0f24ded1b2c files/pwlib-1.5.0-r1-gentoo.diff 391
 MD5 6702f9a296ccf661275cf6a2284bf6bf files/digest-pwlib-1.6.3-r1 64
+MD5 ef62669acbbbc63a30d475ca9865adb6 files/pwlib-1.6.6-ieee1394dc-fix.diff 7207
+MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2-r3 64
+MD5 67bcec54ffa82d8da3b0c0e2f23daf7e files/digest-pwlib-1.5.0-r1 64
+MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2-r2 64
 MD5 6702f9a296ccf661275cf6a2284bf6bf files/digest-pwlib-1.6.3 64
-MD5 8c6469f000dea2a13869631fcedbe0ff files/pwlib-1.5.2-asnparser-secfix.diff 1299
 MD5 0c5d290a2ad15d1e8b2ae85365a83bd6 files/digest-pwlib-1.3.11-r1 64
-MD5 91035c6391e112595e0003cebda275f6 files/pwlib-1.3.11-r1.diff 2260
+MD5 0a9a8c5a1417127269e2e0f24ded1b2c files/pwlib-1.5.0-r1-gentoo.diff 391
+MD5 c1a54c4c742e40812c02bea08e570604 files/digest-pwlib-1.4.11 64
 MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2-r1 64
-MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2-r3 64
+MD5 3057a7e05b6e701041865f26fd1fb8c3 files/digest-pwlib-1.6.6-r1 69
 MD5 67bcec54ffa82d8da3b0c0e2f23daf7e files/digest-pwlib-1.5.0 64
-MD5 ef62669acbbbc63a30d475ca9865adb6 files/pwlib-1.6.6-ieee1394dc-fix.diff 7207
-MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2 64
-MD5 c1a54c4c742e40812c02bea08e570604 files/digest-pwlib-1.4.11 64
-MD5 67bcec54ffa82d8da3b0c0e2f23daf7e files/digest-pwlib-1.5.0-r1 64
 MD5 3057a7e05b6e701041865f26fd1fb8c3 files/digest-pwlib-1.6.6 69
+MD5 91035c6391e112595e0003cebda275f6 files/pwlib-1.3.11-r1.diff 2260
 MD5 6702f9a296ccf661275cf6a2284bf6bf files/digest-pwlib-1.6.3-r2 64
-MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2-r2 64
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.6 (GNU/Linux)
-
-iD8DBQFBkJz0ugEuf3OQ0akRAuKuAJ4ygcxlkk5wN8lZRI/qNktcB0V0RQCgnmdI
-9n1ocMGFemRag5uz7R7lpr0=
-=DkGY
------END PGP SIGNATURE-----
+MD5 8c6469f000dea2a13869631fcedbe0ff files/pwlib-1.5.2-asnparser-secfix.diff 1299
+MD5 ca45f803b5a998565dd29d6b845d73d3 files/pwlib-1.6.6-alsa_dmix.diff 7613
+MD5 4fc6a7891d23db3dc2837f825afa2324 files/digest-pwlib-1.5.2 64
diff --git a/dev-libs/pwlib/files/digest-pwlib-1.6.6-r1 b/dev-libs/pwlib/files/digest-pwlib-1.6.6-r1
new file mode 100644 (file)
index 0000000..82c1731
--- /dev/null
@@ -0,0 +1 @@
+MD5 c3ae07b03cd48d57cd9d6ec346182ed4 pwlib-v1_6_6-src.tar.gz 1583087
diff --git a/dev-libs/pwlib/files/pwlib-1.6.6-alsa_dmix.diff b/dev-libs/pwlib/files/pwlib-1.6.6-alsa_dmix.diff
new file mode 100644 (file)
index 0000000..2d1ded9
--- /dev/null
@@ -0,0 +1,259 @@
+diff -ru pwlib-orig/plugins/sound_alsa/sound_alsa.cxx pwlib/plugins/sound_alsa/sound_alsa.cxx
+--- pwlib-orig/plugins/sound_alsa/sound_alsa.cxx       2004-03-13 13:36:14.000000000 +0100
++++ pwlib/plugins/sound_alsa/sound_alsa.cxx    2004-10-21 18:33:38.562610536 +0200
+@@ -28,6 +28,21 @@
+  * Contributor(s): /
+  *
+  * $Log: sound_alsa.cxx,v $
++ * Revision 1.21  2004/10/18 11:43:39  dsandras
++ * Use Capture instead of Mic when changing the volume. Use the correct mixer when using the Default device.
++ *
++ * Revision 1.20  2004/10/14 19:30:16  dsandras
++ * Removed DMIX and DSNOOP plugins and added support for DEFAULT as it is the correcti way to do things.
++ *
++ * Revision 1.19  2004/08/30 21:09:41  dsandras
++ * Added DSNOOP plugin support.
++ *
++ * Revision 1.18  2004/05/14 10:15:26  dominance
++ * Fixes direct opening of sound output devices. The list of devices does no longer return NULL in that case. Patch provided by Julien Puydt <julien.puydt@laposte.net>.
++ *
++ * Revision 1.17  2004/04/03 10:33:45  dsandras
++ * Use PStringToOrdinal to store the detected devices, that fixes problems if there is a discontinuity in the succession of soundcard ID's. For example the user has card ID 1 and 3, but not 2.
++ *
+  * Revision 1.16  2004/03/13 12:36:14  dsandras
+  * Added support for DMIX plugin output.
+  *
+@@ -81,8 +96,8 @@
+ PCREATE_SOUND_PLUGIN(ALSA, PSoundChannelALSA)
+ 
+ 
+-static PStringArray playback_devices;
+-static PStringArray capture_devices;
++static PStringToOrdinal playback_devices;
++static PStringToOrdinal capture_devices;
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+@@ -119,8 +134,9 @@
+ }
+ 
+ 
+-PStringArray PSoundChannelALSA::GetDeviceNames (Directions dir)
++void PSoundChannelALSA::UpdateDictionary (Directions dir)
+ {
++  
+   int card = -1, dev = -1;
+   
+   snd_ctl_t *handle = NULL;
+@@ -134,12 +150,12 @@
+   if (dir == Recorder) {
+ 
+     stream = SND_PCM_STREAM_CAPTURE;
+-    capture_devices = PStringArray ();
++    capture_devices = PStringToOrdinal ();
+   }
+   else {
+ 
+     stream = SND_PCM_STREAM_PLAYBACK;
+-    playback_devices = PStringArray ();
++    playback_devices = PStringToOrdinal ();
+   }
+ 
+   snd_ctl_card_info_alloca (&info);
+@@ -148,7 +164,7 @@
+   /* No sound card found */
+   if (snd_card_next (&card) < 0 || card < 0) {
+ 
+-    return PStringArray ();
++    return;
+   }
+ 
+ 
+@@ -176,13 +192,11 @@
+           snd_card_get_name (card, &name);
+           if (dir == Recorder) {
+ 
+-            if (capture_devices.GetStringsIndex (name) == P_MAX_INDEX)
+-              capture_devices.AppendString (name);
++              capture_devices.SetAt (name, card);
+           }
+           else {
+ 
+-            if (playback_devices.GetStringsIndex (name) == P_MAX_INDEX)
+-              playback_devices.AppendString (name);
++              playback_devices.SetAt (name, card);
+           }
+ 
+           free (name);
+@@ -193,17 +207,27 @@
+     snd_ctl_close(handle);
+     snd_card_next (&card);
+   }
++}
+ 
+-
+-  if (dir == Recorder)
+-    return capture_devices;
+-  else {
++PStringArray PSoundChannelALSA::GetDeviceNames (Directions dir)
++{
++  PStringArray devices;
++  PStringToOrdinal devices_dict;
+  
+-    if (playback_devices.GetSize () > 0)
+-      playback_devices += "DMIX Plugin";
++  if (dir == Recorder)
++    devices_dict = capture_devices;
++  else
++    devices_dict = playback_devices;
++
++  UpdateDictionary (dir);
++  
++  if (devices_dict.GetSize () > 0)
++    devices += "Default";
++  
++  for (PINDEX j = 0 ; j < devices_dict.GetSize () ; j++) 
++    devices += devices_dict.GetKeyAt (j);
+     
+-    return playback_devices;
+-  }
++  return devices;
+ }
+ 
+ 
+@@ -223,7 +247,7 @@
+                             unsigned _bitsPerSample)
+ {
+   PString real_device_name;
+-  PINDEX i = 0;
++  POrdinalKey *i = NULL;
+   snd_pcm_stream_t stream;
+ 
+   Close();
+@@ -236,21 +260,31 @@
+     stream = SND_PCM_STREAM_PLAYBACK;
+ 
+   /* Open in NONBLOCK mode */
+-  if (_dir != Recorder && _device == "DMIX Plugin") {
++  if (_device == "Default") {
+ 
+-    real_device_name = "plug:dmix";
++    real_device_name = "default";
++    card_nr = -2;
+   }
+-  else if ((i = (_dir == Recorder) ? capture_devices.GetStringsIndex (_device) : playback_devices.GetStringsIndex (_device)) != P_MAX_INDEX) {
++  else {
++
++  if ((_dir == Recorder && capture_devices.IsEmpty ())
++      || (_dir == Player && playback_devices.IsEmpty ()))
++    UpdateDictionary (_dir);
++
++    i = (_dir == Recorder) ? capture_devices.GetAt (_device) : playback_devices.GetAt (_device);
+ 
+-    real_device_name = "plughw:" + PString (i);
+-    card_nr = i;
++    if (i) {
++
++      real_device_name = "plughw:" + PString (*i);
++      card_nr = *i;
++    }
++    else {
++
++      PTRACE (1, "ALSA\tDevice not found");
++      return FALSE;
++    }
+   }
+-  else {
+     
+-    PTRACE (1, "ALSA\tDevice unavailable");
+-    return FALSE;
+-  }
+-
+   if (snd_pcm_open (&os_handle, real_device_name, stream, SND_PCM_NONBLOCK) < 0) {
+ 
+     PTRACE (1, "ALSA\tOpen Failed");
+@@ -735,7 +769,7 @@
+   snd_mixer_elem_t *elem;
+   snd_mixer_selem_id_t *sid;
+ 
+-  const char *play_mix_name = (direction == Player) ? "PCM": "Mic";
++  const char *play_mix_name = (direction == Player) ? "PCM": "Capture";
+   PString card_name;
+ 
+   long pmin = 0, pmax = 0;
+@@ -744,7 +778,10 @@
+   if (!os_handle)
+     return FALSE;
+ 
+-  card_name = "hw:" + PString (card_nr);
++  if (card_nr == -2)
++    card_name = "default";
++  else
++    card_name = "hw:" + PString (card_nr);
+ 
+   //allocate simple id
+   snd_mixer_selem_id_alloca (&sid);
+@@ -796,23 +833,39 @@
+     return FALSE;
+   }
+ 
+-  snd_mixer_selem_get_playback_volume_range (elem, &pmin, &pmax);
+ 
+   if (set) {
+-
+-    vol = (set_vol * (pmax?pmax:31)) / 100;
+-    snd_mixer_selem_set_playback_volume (elem, 
+-                                       SND_MIXER_SCHN_FRONT_LEFT, vol);
+-    snd_mixer_selem_set_playback_volume (elem, 
+-                                       SND_MIXER_SCHN_FRONT_RIGHT, vol);
+     
++    if (direction == Player) {
++      
++      snd_mixer_selem_get_playback_volume_range (elem, &pmin, &pmax);
++      vol = (set_vol * (pmax?pmax:31)) / 100;
++      snd_mixer_selem_set_playback_volume_all (elem, vol);
++    }
++    else {
++      
++      snd_mixer_selem_get_capture_volume_range (elem, &pmin, &pmax);
++      vol = (set_vol * (pmax?pmax:31)) / 100;
++      snd_mixer_selem_set_capture_volume_all (elem, vol);
++    }
+     PTRACE (4, "Set volume to " << vol);
+   }
+   else {
+ 
+-    snd_mixer_selem_get_playback_volume (elem, 
+-                                       SND_MIXER_SCHN_FRONT_LEFT, &vol);
++    if (direction == Player) {
++      
++      snd_mixer_selem_get_playback_volume_range (elem, &pmin, &pmax);
++      snd_mixer_selem_get_playback_volume (elem, SND_MIXER_SCHN_FRONT_LEFT, 
++                                         &vol);
++    }
++    else {
++      
++      snd_mixer_selem_get_capture_volume_range (elem, &pmin, &pmax);
++      snd_mixer_selem_get_capture_volume (elem, SND_MIXER_SCHN_FRONT_LEFT,
++                                        &vol); 
++    }
+     get_vol = (vol * 100) / (pmax?pmax:31);
++
+     PTRACE (4, "Got volume " << vol);
+   }
+ 
+Only in pwlib/plugins/sound_alsa: .sound_alsa.cxx-patch.swp
+diff -ru pwlib-orig/plugins/sound_alsa/sound_alsa.h pwlib/plugins/sound_alsa/sound_alsa.h
+--- pwlib-orig/plugins/sound_alsa/sound_alsa.h 2003-12-28 16:10:35.000000000 +0100
++++ pwlib/plugins/sound_alsa/sound_alsa.h      2004-10-21 18:35:51.559391952 +0200
+@@ -89,7 +89,8 @@
+   BOOL IsOpen() const;
+ 
+  private:
+-
++ 
++  static void UpdateDictionary(PSoundChannel::Directions);
+   BOOL Volume (BOOL, unsigned, unsigned &);
+   PSoundChannel::Directions direction;
+   PString device;
+
diff --git a/dev-libs/pwlib/pwlib-1.6.6-r1.ebuild b/dev-libs/pwlib/pwlib-1.6.6-r1.ebuild
new file mode 100644 (file)
index 0000000..fe3e597
--- /dev/null
@@ -0,0 +1,155 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/pwlib/pwlib-1.6.6-r1.ebuild,v 1.1 2004/11/30 22:59:27 stkn Exp $
+
+inherit eutils
+
+IUSE="ssl sdl ieee1394 alsa esd"
+
+MY_P="${PN}-v${PV//./_}"
+DESCRIPTION="Portable Multiplatform Class Libraries for OpenH323"
+HOMEPAGE="http://www.openh323.org/"
+SRC_URI="mirror://sourceforge/openh323/${MY_P}-src.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~amd64 ~sparc ~alpha"
+
+DEPEND=">=sys-devel/bison-1.28
+       >=sys-devel/flex-2.5.4a
+       dev-libs/expat
+       >=sys-apps/sed-4
+       net-nds/openldap
+       sdl? ( media-libs/libsdl )
+       ssl? ( dev-libs/openssl )
+       alsa? ( media-libs/alsa-lib )
+       ieee1394? ( media-libs/libdv
+               sys-libs/libavc1394
+               sys-libs/libraw1394
+               media-plugins/libdc1394 )
+       esd? ( media-sound/esound )"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}/make
+
+       # filter out -O3 and -mcpu embedded compiler flags
+       sed -i \
+               -e "s:-mcpu=\$(CPUTYPE)::" \
+               -e "s:-O3 -DNDEBUG:-DNDEBUG:" \
+               unix.mak
+
+       # small fix for firewire dc (camera) plugin
+       cd ${S}
+       epatch ${FILESDIR}/${P}-ieee1394dc-fix.diff
+
+       # dmix patch for alsa support (#68553)
+       epatch ${FILESDIR}/${P}-alsa_dmix.diff
+}
+
+src_compile() {
+       local plugins
+       local myconf
+
+       if use ssl; then
+               export OPENSSLFLAG=1
+               export OPENSSLDIR="/usr"
+               export OPENSSLLIBS="-lssl -lcrypt"
+       fi
+
+       ## gnomemeeting-1.00 requires pwlib to be built w/ IPV6 support
+       ## (even if itself is built without...)
+       #use ipv6 \
+       #       && myconf="${myconf} --enable-ipv6" \
+       #       || myconf="${myconf} --disable-ipv6"
+       myconf="${myconf} --enable-ipv6"
+
+       # plugins, oss and v4l are default
+       plugins="oss v4l"
+
+       use ieee1394 \
+               && plugins="${plugins} avc dc"
+
+       use alsa \
+               && plugins="${plugins} alsa"
+
+       if use esd; then
+               # fixes bug #45059
+               export ESDDIR=/usr
+       fi
+
+       # merge plugin options (safe way if default = "")
+       plugins="`echo ${plugins} | sed -e "y: :,:"`"
+
+       econf ${myconf} \
+               --enable-plugins \
+               --with-plugins=${plugins} || die "configure failed"
+
+       # Horrible hack to strip out -L/usr/lib to allow upgrades
+       # problem is it adds -L/usr/lib before -L${S} when SSL is
+       # enabled.  Same thing for -I/usr/include.
+       sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
+               -e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
+               ${S}/make/ptbuildopts.mak
+       sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
+               -e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
+               -e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
+               ${S}/make/ptlib-config
+
+       # remove -fno-rtti, this breaks various things *grr*
+       sed -i -e "s:-fno-rtti::" \
+               make/ptbuildopts.mak
+       sed -i -e "s:-fno-rtti::" \
+               make/ptlib-config
+
+       emake opt || die "make failed"
+       emake PWLIBDIR=${S} -C plugins opt || die "make plugins failed"
+}
+
+src_install() {
+       # make these because the makefile isn't smart enough
+       dodir /usr/bin /usr/lib /usr/share /usr/include
+       make PREFIX=${D}/usr install || die "install failed"
+
+       # these are for compiling openh323
+       # NOTE: symlinks don't work when upgrading
+       # FIXME: probably should fix this with ptlib-config
+       dodir /usr/share/pwlib/include
+       cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
+
+       dodir /usr/share/pwlib/lib
+       for x in ${D}/usr/lib/*; do
+               dosym /usr/lib/`basename ${x}` /usr/share/pwlib/lib/`basename ${x}`
+       done
+
+       # remove CVS dirs
+       find ${D} -name CVS -type d | xargs rm -rf
+
+       # fix symlink
+       # only amd64 needs special handling, afaiks
+       rm ${D}/usr/lib/libpt.so
+       if [ ${ARCH} = "amd64" ] ; then
+               dosym /usr/lib/libpt_linux_x86_64_r.so.${PV} /usr/lib/libpt.so
+       else
+               dosym /usr/lib/libpt_linux_${ARCH}_r.so.${PV} /usr/lib/libpt.so
+       fi
+
+       # strip ${S} stuff
+       dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
+       dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
+
+       # dodgy configure/makefiles forget to expand this
+       dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
+
+       # satisfy ptlib.mak's weird definition (should check if true for future versions)
+       cp ${D}/usr/bin/ptlib-config ${D}/usr/share/pwlib/make/ptlib-config
+
+       # copy version.h
+       insinto /usr/share/pwlib
+       doins version.h
+
+       dodoc ReadMe.txt History.txt
+}