Bug 115218 - Update port: audio/libmtp to version 0.2.0
Summary: Update port: audio/libmtp to version 0.2.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-05 16:00 UTC by pesho.petrov
Modified: 2007-08-17 11:10 UTC (History)
0 users

See Also:


Attachments
libmtp-update.patch (3.39 KB, patch)
2007-08-05 16:00 UTC, pesho.petrov
no flags Details | Diff
file.diff (426 bytes, patch)
2007-08-05 16:00 UTC, pesho.petrov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pesho.petrov 2007-08-05 16:00:02 UTC
- libmtp-update.patch updates audio/libmtp to version 0.2.0 and removes already useless patch files in the port.
- amarok-update.patch updates audio/amarok to work with the new version of libmtp.
Comment 1 dfilter service freebsd_committer 2007-08-15 18:24:11 UTC
sat         2007-08-15 17:24:05 UTC

  FreeBSD ports repository

  Modified files:
    audio/amarok         Makefile 
    audio/gnomad2        Makefile 
    audio/libmtp         Makefile distinfo pkg-plist 
  Removed files:
    audio/libmtp/files   patch-examples-common.h 
                         patch-examples-sendfile.c 
                         patch-examples-sendtr.c 
  Log:
  - Update libmtp to 0.2.0
  - Chase shlib version bump in amarok and gnomad2
  
  PR:             ports/115218
  Submitted by:   Petar Zhivkov Petrov <pesho.petrov@gmail.com>
  
  Revision  Changes    Path
  1.74      +2 -2      ports/audio/amarok/Makefile
  1.5       +1 -1      ports/audio/gnomad2/Makefile
  1.6       +4 -1      ports/audio/libmtp/Makefile
  1.5       +3 -3      ports/audio/libmtp/distinfo
  1.2       +0 -11     ports/audio/libmtp/files/patch-examples-common.h (dead)
  1.2       +0 -11     ports/audio/libmtp/files/patch-examples-sendfile.c (dead)
  1.2       +0 -11     ports/audio/libmtp/files/patch-examples-sendtr.c (dead)
  1.4       +2 -1      ports/audio/libmtp/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 2 sat freebsd_committer 2007-08-15 18:24:22 UTC
State Changed
From-To: open->closed

Committed, thanks! 

Note that I didn't replace cppflags with cflags because it 
upsets configure, which can lead to subtle bugs. I also 
prevented docs from installing when doxygen is around.
Comment 3 sat freebsd_committer 2007-08-17 09:57:40 UTC
On 8/17/07, Petar Petrov <pesho.petrov@gmail.com> wrote:
> Thank you!
>
> Unfortunately using CPPFLAGS instead of CFLAGS requires the patch
> files that the patch in the PR removes.
>
> Those patches were needed because in some cases the upgrade fails,
> because the examples in examples/ use the installed version of
> libmtp.h instead of the one in the distribution being compiled. For
> example the upgrade from 0.1.5 to 0.2.0 fails because of this same
> reason. Using CFLAGS instead of CPPFLAGS causes -I../src to appear
> before -I/usr/local/include when building the code and then the code
> uses the right header file. While using CPPFLAGS swaps them (e.g.
> -I/usr/local/include is before -I../src).
>
> The upgrading problem can be solved by either:
> - Removing libmtp 0.1.5 and installing version 0.2.0.
> - Putting back the patch files in files/.
> - Replacing "CPPFLAGS=..." with "CFLAGS=..." in the port Makefile (may
> lead to other problems).

I see. This command in post-patch fixes the problem:
@${REINPLACE_CMD} -Ee 's|(\$$[(]CPPFLAGS[)]) (\$$[(]AM_CFLAGS[)])|\2 \1|'\
${WRKSRC}/src/Makefile.in ${WRKSRC}/examples/Makefile.in

I can commit it now if it's OK with you.
Comment 4 pesho.petrov 2007-08-17 10:35:09 UTC
On 8/17/07, Andrew Pantyukhin <sat@freebsd.org> wrote:
> On 8/17/07, Petar Petrov <pesho.petrov@gmail.com> wrote:
> > Thank you!
> >
> > Unfortunately using CPPFLAGS instead of CFLAGS requires the patch
> > files that the patch in the PR removes.
> >
> > Those patches were needed because in some cases the upgrade fails,
> > because the examples in examples/ use the installed version of
> > libmtp.h instead of the one in the distribution being compiled. For
> > example the upgrade from 0.1.5 to 0.2.0 fails because of this same
> > reason. Using CFLAGS instead of CPPFLAGS causes -I../src to appear
> > before -I/usr/local/include when building the code and then the code
> > uses the right header file. While using CPPFLAGS swaps them (e.g.
> > -I/usr/local/include is before -I../src).
> >
> > The upgrading problem can be solved by either:
> > - Removing libmtp 0.1.5 and installing version 0.2.0.
> > - Putting back the patch files in files/.
> > - Replacing "CPPFLAGS=..." with "CFLAGS=..." in the port Makefile (may
> > lead to other problems).
>
> I see. This command in post-patch fixes the problem:
> @${REINPLACE_CMD} -Ee 's|(\$$[(]CPPFLAGS[)]) (\$$[(]AM_CFLAGS[)])|\2 \1|'\
> ${WRKSRC}/src/Makefile.in ${WRKSRC}/examples/Makefile.in
>
> I can commit it now if it's OK with you.

It seems to solve the problem currently and looks like an acceptable
solution. Though it may stop working later (for example if $(CPPFLAGS)
and $(AM_CFLAGS) happen to be on different lines in the Makefile.in).
But I'm ok with it, just add a few word comment why is that command.
Also we don't need to modify ${WRKSRC}/src/Makefile.in, just the one
in examples/.

The real fix of the problem is in examples/Makefile.am to have the line
"AM_CFLAGS=-I$(top_builddir)/src" replaced by
"AM_CPPFLAGS=-I$(top_builddir)/src", but that must be done by the
libmtp developers. I'll send them a patch, so we can later remove the
REINPLACE command.

Thanks!