Re: [UPDATE] chromaprint 1.1

2014-05-09 Thread Vadim Zhukov
09.05.2014 4:30 пользователь "Stuart Henderson"  написал:
>
> On 2014/05/07 18:24, Nils R wrote:
> > > Hi ports@,
> > >
> > > this is an update of chromaprint to the latest version.
> > >
> > > It builds on amd64, and the tests run fine with `make test`
> > > (the command for running the tests in the current port
> > > doesn't work).
> > >
> > > I will try this out now with puddletag ;)
> > >
> > > Any comments?  Please test.
> > >
> > > Nils
> > >
> > >
> > > PS. I would have sent diffs, but i could not add the patch
> > > directory to cvs, so i made a tarball.
> >
> > Puddletag needs the fpcalc utility program that ships with
> > chromaprint.  With this tarball, it gets build and installed
> > by default.
> >
> > Now, tagging through AcousticID works in puddletag.
> >
> >
> > Nils
>
> Just been looking at this; it seems wrong that gtest should become
> a LIB_DEPENDS ... and building it and running port-lib-depends-check
> it doesn't seem that installed files actually do link to it.
>
> Since it's an update to an existing port I've tweaked it a bit to
> reduce the diff, and also added a perl subst to replace /usr/local
> with LOCALBASE in FindGTest.cmake. (I've done it this way rather
> than using SUBST_CMD so that "make update-patches" gives less
> trouble).
>
> I don't know what abi-compliance-checker was saying, but this *is*
> an ABI change (two additional functions; chromaprint_set_option and
>
Chromaprint::FingerprinterConfigurationTest4::FingerprinterConfigurationTest4
> also Chromaprint::SilenceRemover::SilenceRemover takes an additional
> parameter) so I've bumped shlib major.
>
> I'm building clementine now. Assuming that goes OK, any comments/
> objections/OKs to this version?

Instead of calling SUBST_CMD you could just add "-D LOCALBASE=${LOCALBASE}"
to CONFIGURE_ARGS. :)

Otherwise, if Clementine will work (my laptop almost gone crazy, so I'm out
of development for a few days), here is my okay, too.

> Index: Makefile
> ===
> RCS file: /cvs/ports/audio/chromaprint/Makefile,v
> retrieving revision 1.2
> diff -u -p -r1.2 Makefile
> --- Makefile10 Mar 2013 22:55:01 -  1.2
> +++ Makefile9 May 2014 00:22:48 -
> @@ -1,19 +1,20 @@
>  # $OpenBSD: Makefile,v 1.2 2013/03/10 22:55:01 espie Exp $
> +
>  SHARED_ONLY =  Yes
> +
>  COMMENT =  audio fingerprint extraction library
> -CATEGORIES =   audio devel
> -HOMEPAGE = http://acoustid.org/chromaprint/
> -DISTNAME = chromaprint-0.6
>
> -MASTER_SITES = http://www.ohvost.ru/dnl/ \
> -   http://malcolm.ecentrum.hu/distfiles/
> +DISTNAME = chromaprint-1.1
> +CATEGORIES =   audio devel
> +HOMEPAGE = https://acoustid.org/chromaprint/
> +MASTER_SITES =
https://bitbucket.org/acoustid/chromaprint/downloads/
>
> -SHARED_LIBS =  chromaprint 0.0  # 0.1
> +SHARED_LIBS =  chromaprint   1.0 # 0.1
>
>  # LGPL2.1+
>  PERMIT_PACKAGE_CDROM = Yes
>
> -WANTLIB =  avcodec avutil m stdc++
> +WANTLIB += avcodec avformat avutil c m pthread stdc++ swresample
>
>  MODULES =  devel/cmake
>
> @@ -24,9 +25,13 @@ LIB_DEPENDS =graphics/ffmpeg
>
>  # gtest presence is checked in configure stage, so this cannot be in
TEST_DEPENDS
>  BUILD_DEPENDS +=   devel/gtest
> -CONFIGURE_ARGS =   -DBUILD_TESTS:Bool=Yes
> +CONFIGURE_ARGS =   -DBUILD_TESTS:Bool=Yes -DBUILD_EXAMPLES=ON
> +
> +post-patch:
> +   perl -pi -e 's,/usr/local,${LOCALBASE},' \
> +   ${WRKSRC}/cmake/modules/FindGTest.cmake
>
>  do-test:
> -   cd ${WRKBUILD}/tests && ${MAKE_PROGRAM} check
> +   cd ${WRKBUILD}/tests && ./all_tests
>
>  .include 
> Index: distinfo
> ===
> RCS file: /cvs/ports/audio/chromaprint/distinfo,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 distinfo
> --- distinfo5 Feb 2013 11:09:11 -   1.1.1.1
> +++ distinfo9 May 2014 00:22:48 -
> @@ -1,2 +1,2 @@
> -SHA256 (chromaprint-0.6.tar.gz) =
XZuC2iJkUMFOQ0gjcaGyoXjiYEq1suklnzOxtGHunWM=
> -SIZE (chromaprint-0.6.tar.gz) = 542366
> +SHA256 (chromaprint-1.1.tar.gz) =
axTX6klkWBtzvT+AOMiFfAHkRkIcGumcu/ZN4mtHzRI=
> +SIZE (chromaprint-1.1.tar.gz) = 542360
> Index: patches/patch-cmake_modules_FindGTest_cmake
> ===
> RCS file: patches/patch-cmake_modules_FindGTest_cmake
> diff -N patches/patch-cmake_modules_FindGTest_cmake
> --- /dev/null   1 Jan 1970 00:00:00 -
> +++ patches/patch-cmake_modules_FindGTest_cmake 9 May 2014 00:22:48 -
> @@ -0,0 +1,31 @@
> +$OpenBSD$
> +--- cmake/modules/FindGTest.cmake.orig Sat Nov 23 16:43:42 2013
>  cmake/modules/FindGTest.cmake  Wed May  7 16:29:15 2014
> +@@ -71,12 +71,24 @@ find_path(GTEST_INCLUDE_DIR
> + )
> + mark_as_advanced(GTEST_INCLUDE_DIR)
> +
> ++MACRO(GTEST

Re: [UPDATE] chromaprint 1.1

2014-05-08 Thread Stuart Henderson
On 2014/05/07 18:24, Nils R wrote:
> > Hi ports@,
> > 
> > this is an update of chromaprint to the latest version.
> > 
> > It builds on amd64, and the tests run fine with `make test`
> > (the command for running the tests in the current port 
> > doesn't work).
> > 
> > I will try this out now with puddletag ;)
> > 
> > Any comments?  Please test.
> > 
> > Nils
> > 
> > 
> > PS. I would have sent diffs, but i could not add the patch
> > directory to cvs, so i made a tarball.
> 
> Puddletag needs the fpcalc utility program that ships with 
> chromaprint.  With this tarball, it gets build and installed
> by default.
> 
> Now, tagging through AcousticID works in puddletag.
> 
> 
> Nils

Just been looking at this; it seems wrong that gtest should become
a LIB_DEPENDS ... and building it and running port-lib-depends-check
it doesn't seem that installed files actually do link to it.

Since it's an update to an existing port I've tweaked it a bit to
reduce the diff, and also added a perl subst to replace /usr/local
with LOCALBASE in FindGTest.cmake. (I've done it this way rather
than using SUBST_CMD so that "make update-patches" gives less
trouble).

I don't know what abi-compliance-checker was saying, but this *is*
an ABI change (two additional functions; chromaprint_set_option and
Chromaprint::FingerprinterConfigurationTest4::FingerprinterConfigurationTest4
also Chromaprint::SilenceRemover::SilenceRemover takes an additional
parameter) so I've bumped shlib major.

I'm building clementine now. Assuming that goes OK, any comments/
objections/OKs to this version?


Index: Makefile
===
RCS file: /cvs/ports/audio/chromaprint/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile10 Mar 2013 22:55:01 -  1.2
+++ Makefile9 May 2014 00:22:48 -
@@ -1,19 +1,20 @@
 # $OpenBSD: Makefile,v 1.2 2013/03/10 22:55:01 espie Exp $
+
 SHARED_ONLY =  Yes
+
 COMMENT =  audio fingerprint extraction library
-CATEGORIES =   audio devel
-HOMEPAGE = http://acoustid.org/chromaprint/
-DISTNAME = chromaprint-0.6
 
-MASTER_SITES = http://www.ohvost.ru/dnl/ \
-   http://malcolm.ecentrum.hu/distfiles/
+DISTNAME = chromaprint-1.1
+CATEGORIES =   audio devel
+HOMEPAGE = https://acoustid.org/chromaprint/
+MASTER_SITES = https://bitbucket.org/acoustid/chromaprint/downloads/
 
-SHARED_LIBS =  chromaprint 0.0  # 0.1
+SHARED_LIBS =  chromaprint   1.0 # 0.1
 
 # LGPL2.1+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =  avcodec avutil m stdc++
+WANTLIB += avcodec avformat avutil c m pthread stdc++ swresample
 
 MODULES =  devel/cmake
 
@@ -24,9 +25,13 @@ LIB_DEPENDS =graphics/ffmpeg
 
 # gtest presence is checked in configure stage, so this cannot be in 
TEST_DEPENDS
 BUILD_DEPENDS +=   devel/gtest
-CONFIGURE_ARGS =   -DBUILD_TESTS:Bool=Yes
+CONFIGURE_ARGS =   -DBUILD_TESTS:Bool=Yes -DBUILD_EXAMPLES=ON
+
+post-patch:
+   perl -pi -e 's,/usr/local,${LOCALBASE},' \
+   ${WRKSRC}/cmake/modules/FindGTest.cmake
 
 do-test:
-   cd ${WRKBUILD}/tests && ${MAKE_PROGRAM} check
+   cd ${WRKBUILD}/tests && ./all_tests
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/audio/chromaprint/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo5 Feb 2013 11:09:11 -   1.1.1.1
+++ distinfo9 May 2014 00:22:48 -
@@ -1,2 +1,2 @@
-SHA256 (chromaprint-0.6.tar.gz) = XZuC2iJkUMFOQ0gjcaGyoXjiYEq1suklnzOxtGHunWM=
-SIZE (chromaprint-0.6.tar.gz) = 542366
+SHA256 (chromaprint-1.1.tar.gz) = axTX6klkWBtzvT+AOMiFfAHkRkIcGumcu/ZN4mtHzRI=
+SIZE (chromaprint-1.1.tar.gz) = 542360
Index: patches/patch-cmake_modules_FindGTest_cmake
===
RCS file: patches/patch-cmake_modules_FindGTest_cmake
diff -N patches/patch-cmake_modules_FindGTest_cmake
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-cmake_modules_FindGTest_cmake 9 May 2014 00:22:48 -
@@ -0,0 +1,31 @@
+$OpenBSD$
+--- cmake/modules/FindGTest.cmake.orig Sat Nov 23 16:43:42 2013
 cmake/modules/FindGTest.cmake  Wed May  7 16:29:15 2014
+@@ -71,12 +71,24 @@ find_path(GTEST_INCLUDE_DIR
+ )
+ mark_as_advanced(GTEST_INCLUDE_DIR)
+ 
++MACRO(GTEST_FIND varname shortname)
++
++FIND_LIBRARY(${varname}
++NAMES ${shortname}
++PATHS
++/usr/local/lib
++  NO_DEFAULT_PATH
++DOC "Location of GTEST Libraries"
++)
++
++ENDMACRO(GTEST_FIND)
++
+ include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(GTest DEFAULT_MSG GTEST_SOURCE_DIR 
GTEST_INCLUDE_DIR)
++find_package_handle_standard_args(GTest DEFAULT_MSG GTEST_INCLUDE_DIR)
+ 
+ if(GTEST_FOUND)
+   set(GTEST_INCLUDE

Re: [UPDATE] chromaprint 1.1

2014-05-08 Thread Stuart Henderson
On 2014/05/08 08:50, Nils R wrote:
> i tried to install clementine, but building the dependency 
> devel/sparsehash failed with "virtual memory exhausted: 
> Cannot allocate memory" (with freshly pulled ports):

Raise the datasize limit for your login class in login.conf,
you will need to logout and back in for the change to take
effect. Alternatively just install the dep from packages.

> Regarding 2), no ABI change was documented, but how can i be sure?

I start by looking at the list of exported functions from nm -g
(see http://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs),
if the list changes this gives a clear "you need to bump" - removing
functions needs a major bump (libfoo.so.major.minor) - adding functions
at least needs a minor bump.

But you also need to look for changes in function parameters, if
e.g. the old version has somefunction(int) and the new version has
somefunction(*ptr, long) they're clearly incompatible so need a
major bump, but you also need to look for other changes; if a
structure passed between function changess then this will often
also need a bump.

To look for this type of change, I diff the old+new source,
run diffstat on it to look for unimportant changes to filter
out and pipe it through filterdiff (from textproc/patchutils) to
remove these, then use mk.1 eyeballs on the remaining diffs.
This is also good for identifying quiet security fixes that
people might have made without mentioning it in release notes ;)

e.g.

 diff -w -r clamav-0.98.{1,3} | filterdiff -x "*/m4/*" -x "*/win32/*" -x 
"configure*" -x "*/docs/*" -x "*/Makefile*" -x "*/docs/*" -x "*/config/*"



Re: [UPDATE] chromaprint 1.1

2014-05-08 Thread Nils R
David Coppa schrieb am 08.05.2014 09:10:

> On Thu, May 8, 2014 at 8:50 AM, Nils R  wrote:
> 
>> Regarding 2), no ABI change was documented, but how can i be sure?
> 
> I use this:
> https://github.com/jasperla/openbsd-wip/tree/master/devel/abi-compliance-checker
> 
> http://ispras.linuxbase.org/index.php/ABI_compliance_checker
> 
>> Nils
> 
> Ciao!
> David
> 

Ok, the tool gave me this:

$ sudo abi-compliance-checker -lib chromaprint -old chromaprint-0.6.xml -new 
chromaprint-1.1.xml
preparation, please wait ...
Using GCC 4.2.1 (amd64-unknown-openbsd5.5)
checking header(s) 0.6 ...
checking header(s) 1.1 ...
comparing ABIs ...
comparing APIs ...
creating compatibility report ...
result: COMPATIBLE
total "Binary" compatibility problems: 0, warnings: 0
total "Source" compatibility problems: 0, warnings: 2
see detailed report:
  compat_reports/chromaprint/0.6_to_1.1/compat_report.html


I'll attach the report, but it looks good.  Still can't build 
clementine though.

Nils



Re: [UPDATE] chromaprint 1.1

2014-05-08 Thread Vadim Zhukov
08.05.2014 11:13 пользователь "Peter Hessler"  написал:
>
> On 2014 May 08 (Thu) at 09:10:58 +0200 (+0200), David Coppa wrote:
> :I use this:
https://github.com/jasperla/openbsd-wip/tree/master/devel/abi-compliance-checker
>
> If this is useful, please import it into the real tree.  Don't let it
> rot in the wip repo.

It's very fragile by design and cannot be relied upon, especially when
conditional compilation is involved. I have some long-standing plans to
write a better alternative, but have no time for this; maybe at g2k14...
Don't hold your breath.

I've imported the port just because it's best what I do know of, and I know
that KDE developers use this tool. I won't object at importing, but I won't
maintain it also.


Re: [UPDATE] chromaprint 1.1

2014-05-08 Thread Peter Hessler
On 2014 May 08 (Thu) at 09:10:58 +0200 (+0200), David Coppa wrote:
:I use this: 
https://github.com/jasperla/openbsd-wip/tree/master/devel/abi-compliance-checker

If this is useful, please import it into the real tree.  Don't let it
rot in the wip repo.

-- 
Don't say "yes" until I finish talking.
-- Darryl F. Zanuck



Re: [UPDATE] chromaprint 1.1

2014-05-08 Thread David Coppa
On Thu, May 8, 2014 at 8:50 AM, Nils R  wrote:

> Regarding 2), no ABI change was documented, but how can i be sure?

I use this: 
https://github.com/jasperla/openbsd-wip/tree/master/devel/abi-compliance-checker

http://ispras.linuxbase.org/index.php/ABI_compliance_checker

> Nils

Ciao!
David



Re: [UPDATE] chromaprint 1.1

2014-05-07 Thread Nils R
Vadim Zhukov schrieb am 07.05.2014 23:20:

> 2014-05-07 20:24 GMT+04:00, Nils R :
>>> Hi ports@,
>>>
>>> this is an update of chromaprint to the latest version.
>>>
>>> It builds on amd64, and the tests run fine with `make test`
>>> (the command for running the tests in the current port
>>> doesn't work).
>>>
>>> I will try this out now with puddletag ;)
>>>
>>> Any comments?  Please test.
>>>
>>> Nils
>>>
>>>
>>> PS. I would have sent diffs, but i could not add the patch
>>> directory to cvs, so i made a tarball.
>>
>> Puddletag needs the fpcalc utility program that ships with
>> chromaprint.  With this tarball, it gets build and installed
>> by default.
>>
>> Now, tagging through AcousticID works in puddletag.
> 
> Thank you for your submission. Two questions there:
> 
> 1) Did you check that audio/clementine (the only user of chromaprint
> as of now) still builds and works?
> 
> 2) Did actual shared library ABI change? If so, SHARED_LIBS need bump.
> 
> --
>  WBR,
>  Vadim Zhukov
> 

Hi Vadim,

i tried to install clementine, but building the dependency 
devel/sparsehash failed with "virtual memory exhausted: 
Cannot allocate memory" (with freshly pulled ports):

In file included from 
/usr/ports/pobj/sparsehash-2.0.2/sparsehash-2.0.2/src/sparsehash/sparse_hash_map:94,
 from 
/usr/ports/pobj/sparsehash-2.0.2/sparsehash-2.0.2/src/hash_test_interface.h:51,
 from 
/usr/ports/pobj/sparsehash-2.0.2/sparsehash-2.0.2/src/hashtable_test.cc:63:
/usr/include/g++/tr1/functional: In constructor 
'std::tr1::_Simple_type_wrapper<_Tp>::_Simple_type_wrapper(_Tp)':
/usr/include/g++/tr1/functional:804: warning: declaration of '__value' shadows 
a member of 'this'
virtual memory exhausted: Cannot allocate memory
*** Error 1 in . (Makefile:581 'hashtable_test.o')
*** Error 1 in /usr/ports/pobj/sparsehash-2.0.2/build-amd64 (Makefile:437 'all')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2691 
'/usr/ports/pobj/sparsehash-2.0.2/build-amd64/.build_done')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1886 
'/usr/ports/packages/amd64/all/sparsehash-2.0.2p1.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2439 
'_internal-package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2419 'package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1903 
'/var/db/pkg/sparsehash-2.0.2p1/+CONTENTS')
*** Error 1 in /usr/ports/devel/sparsehash 
(/usr/ports/infrastructure/mk/bsd.port.mk:2419 'install')


Regarding 2), no ABI change was documented, but how can i be sure?

Nils



Re: [UPDATE] chromaprint 1.1

2014-05-07 Thread Vadim Zhukov
2014-05-07 20:24 GMT+04:00, Nils R :
>> Hi ports@,
>>
>> this is an update of chromaprint to the latest version.
>>
>> It builds on amd64, and the tests run fine with `make test`
>> (the command for running the tests in the current port
>> doesn't work).
>>
>> I will try this out now with puddletag ;)
>>
>> Any comments?  Please test.
>>
>> Nils
>>
>>
>> PS. I would have sent diffs, but i could not add the patch
>> directory to cvs, so i made a tarball.
>
> Puddletag needs the fpcalc utility program that ships with
> chromaprint.  With this tarball, it gets build and installed
> by default.
>
> Now, tagging through AcousticID works in puddletag.

Thank you for your submission. Two questions there:

1) Did you check that audio/clementine (the only user of chromaprint
as of now) still builds and works?

2) Did actual shared library ABI change? If so, SHARED_LIBS need bump.

--
  WBR,
  Vadim Zhukov



Re: [UPDATE] chromaprint 1.1

2014-05-07 Thread Nils R
> Hi ports@,
> 
> this is an update of chromaprint to the latest version.
> 
> It builds on amd64, and the tests run fine with `make test`
> (the command for running the tests in the current port 
> doesn't work).
> 
> I will try this out now with puddletag ;)
> 
> Any comments?  Please test.
> 
> Nils
> 
> 
> PS. I would have sent diffs, but i could not add the patch
> directory to cvs, so i made a tarball.

Puddletag needs the fpcalc utility program that ships with 
chromaprint.  With this tarball, it gets build and installed
by default.

Now, tagging through AcousticID works in puddletag.


Nils

chromaprint-1.1-rev0.tgz
Description: GNU Zip compressed data


[UPDATE] chromaprint 1.1

2014-05-07 Thread Nils R
Hi ports@,

this is an update of chromaprint to the latest version.

It builds on amd64, and the tests run fine with `make test`
(the command for running the tests in the current port 
doesn't work).

I will try this out now with puddletag ;)

Any comments?  Please test.

Nils


PS. I would have sent diffs, but i could not add the patch
directory to cvs, so i made a tarball.

chromaprint-1.1.tgz
Description: GNU Zip compressed data