Re: UPDATE: jansson (2.12)

2018-12-12 Thread Stuart Henderson
On 2018/12/12 14:45, Kirill Bychkov wrote:
> On Wed, December 12, 2018 14:08, Stuart Henderson wrote:
> > On 2018/12/12 14:02, Kirill Bychkov wrote:
> >> On Wed, December 12, 2018 13:07, Kirill Bychkov wrote:
> >> > On Tue, December 11, 2018 13:40, Stuart Henderson wrote:
> >> >> On 2018/12/11 18:47, YASUOKA Masahiko wrote:
> >> >>> Hi,
> >> >>>
> >> >>> The diff does the followings:
> >> >>>
> >> >>> - update to jansson-2.12
> >> >>> - include a static library
> >> >>> - use configure && make, instead of cmake
> >> >>>
> >> >>> My motivation was to include the static library, since I'd like to use
> >> >>> it within a statically linked CGI program.
> >> >>>
> >> >>> I had tried to modify CMakeLists.txt to build both static and shared
> >> >>> library, but it was not easy for me.  On the other hand, just doing
> >> >>> "configure && make" does it as the default.  I choiced "configure"
> >> >>> rather than cmake.  Is there any reason to keep using cmake?
> >> >>
> >> >> It needs testing with dependent ports either way, but the static
> >> >> library can be added to the cmake build like this:
> >> >>
> >> >> Index: Makefile
> >> >
> >> > [...]
> >> >
> >> >>
> >> >
> >> > Hi!
> >> > Thanks for the diff needed to build static libs alogside shared one.
> >> > I think we could add it without updating jansson itself at this moment.
> >> > Update will follow after testing dependent ports.
> >> >
> >> >
> >> Forgot to add diff
> >
> > There isn't much of concern in the 2.11->2.12 update, I'm partway through
> > a build test of dependent ports with my 2.12 diff at the moment.
> >
> >
> Great. If it doesn't break anything, I'm OK with your patch.
> 

Thanks, tests look good so I have committed.



Re: UPDATE: jansson (2.12)

2018-12-12 Thread Kirill Bychkov
On Wed, December 12, 2018 14:08, Stuart Henderson wrote:
> On 2018/12/12 14:02, Kirill Bychkov wrote:
>> On Wed, December 12, 2018 13:07, Kirill Bychkov wrote:
>> > On Tue, December 11, 2018 13:40, Stuart Henderson wrote:
>> >> On 2018/12/11 18:47, YASUOKA Masahiko wrote:
>> >>> Hi,
>> >>>
>> >>> The diff does the followings:
>> >>>
>> >>> - update to jansson-2.12
>> >>> - include a static library
>> >>> - use configure && make, instead of cmake
>> >>>
>> >>> My motivation was to include the static library, since I'd like to use
>> >>> it within a statically linked CGI program.
>> >>>
>> >>> I had tried to modify CMakeLists.txt to build both static and shared
>> >>> library, but it was not easy for me.  On the other hand, just doing
>> >>> "configure && make" does it as the default.  I choiced "configure"
>> >>> rather than cmake.  Is there any reason to keep using cmake?
>> >>
>> >> It needs testing with dependent ports either way, but the static
>> >> library can be added to the cmake build like this:
>> >>
>> >> Index: Makefile
>> >
>> > [...]
>> >
>> >>
>> >
>> > Hi!
>> > Thanks for the diff needed to build static libs alogside shared one.
>> > I think we could add it without updating jansson itself at this moment.
>> > Update will follow after testing dependent ports.
>> >
>> >
>> Forgot to add diff
>
> There isn't much of concern in the 2.11->2.12 update, I'm partway through
> a build test of dependent ports with my 2.12 diff at the moment.
>
>
Great. If it doesn't break anything, I'm OK with your patch.



Re: UPDATE: jansson (2.12)

2018-12-12 Thread Stuart Henderson
On 2018/12/12 14:02, Kirill Bychkov wrote:
> On Wed, December 12, 2018 13:07, Kirill Bychkov wrote:
> > On Tue, December 11, 2018 13:40, Stuart Henderson wrote:
> >> On 2018/12/11 18:47, YASUOKA Masahiko wrote:
> >>> Hi,
> >>>
> >>> The diff does the followings:
> >>>
> >>> - update to jansson-2.12
> >>> - include a static library
> >>> - use configure && make, instead of cmake
> >>>
> >>> My motivation was to include the static library, since I'd like to use
> >>> it within a statically linked CGI program.
> >>>
> >>> I had tried to modify CMakeLists.txt to build both static and shared
> >>> library, but it was not easy for me.  On the other hand, just doing
> >>> "configure && make" does it as the default.  I choiced "configure"
> >>> rather than cmake.  Is there any reason to keep using cmake?
> >>
> >> It needs testing with dependent ports either way, but the static
> >> library can be added to the cmake build like this:
> >>
> >> Index: Makefile
> >
> > [...]
> >
> >>
> >
> > Hi!
> > Thanks for the diff needed to build static libs alogside shared one.
> > I think we could add it without updating jansson itself at this moment.
> > Update will follow after testing dependent ports.
> >
> >
> Forgot to add diff

There isn't much of concern in the 2.11->2.12 update, I'm partway through
a build test of dependent ports with my 2.12 diff at the moment.



Re: UPDATE: jansson (2.12)

2018-12-12 Thread Kirill Bychkov
On Wed, December 12, 2018 13:07, Kirill Bychkov wrote:
> On Tue, December 11, 2018 13:40, Stuart Henderson wrote:
>> On 2018/12/11 18:47, YASUOKA Masahiko wrote:
>>> Hi,
>>>
>>> The diff does the followings:
>>>
>>> - update to jansson-2.12
>>> - include a static library
>>> - use configure && make, instead of cmake
>>>
>>> My motivation was to include the static library, since I'd like to use
>>> it within a statically linked CGI program.
>>>
>>> I had tried to modify CMakeLists.txt to build both static and shared
>>> library, but it was not easy for me.  On the other hand, just doing
>>> "configure && make" does it as the default.  I choiced "configure"
>>> rather than cmake.  Is there any reason to keep using cmake?
>>
>> It needs testing with dependent ports either way, but the static
>> library can be added to the cmake build like this:
>>
>> Index: Makefile
>
> [...]
>
>>
>
> Hi!
> Thanks for the diff needed to build static libs alogside shared one.
> I think we could add it without updating jansson itself at this moment.
> Update will follow after testing dependent ports.
>
>
Forgot to add diff

Index: Makefile
===
RCS file: /cvs/ports/devel/jansson/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile7 Sep 2018 11:10:30 -   1.12
+++ Makefile12 Dec 2018 11:01:26 -
@@ -3,6 +3,7 @@
 COMMENT =  library for manipulating JSON data

 DISTNAME = jansson-2.11
+REVISION = 0

 SHARED_LIBS =  jansson 3.1

@@ -19,7 +20,7 @@

 MODULES =  devel/cmake

-CONFIGURE_ARGS +=  -DBUILD_SHARED_LIBS=ON \
+CONFIGURE_ARGS +=  -DJANSSON_BUILD_SHARED_LIBS=ON \
-DJANSSON_BUILD_DOCS=OFF \
-DJANSSON_EXAMPLES=OFF

Index: patches/patch-CMakeLists_txt
===
RCS file: /cvs/ports/devel/jansson/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt7 Sep 2018 11:10:30 -   1.5
+++ patches/patch-CMakeLists_txt12 Dec 2018 11:01:26 -
@@ -1,13 +1,40 @@
-$OpenBSD: patch-CMakeLists_txt,v 1.5 2018/09/07 11:10:30 sthen Exp $
+$OpenBSD$
+
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -640,7 +640,7 @@ file(RELATIVE_PATH
- # so that the include dirs are given relative to where the
- # config file is located.
- set(JANSSON__INCLUDE_DIRS
--"\${JANSSON_CMAKE_DIR}/${REL_INCLUDE_DIR}")
-+"${CMAKE_INSTALL_PREFIX}/include")
- configure_file(${PROJECT_SOURCE_DIR}/cmake/JanssonConfig.cmake.in
-
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JanssonConfig.cmake
- @ONLY)
+@@ -352,17 +352,19 @@ if(JANSSON_BUILD_SHARED_LIBS)
+   ${JANSSON_HDR_PRIVATE}
+   ${JANSSON_HDR_PUBLIC}
+   src/jansson.def)
+-
+set_target_properties(jansson PROPERTIES
+   VERSION ${JANSSON_VERSION}
+   SOVERSION ${JANSSON_SOVERSION})
+-else()
+-   add_library(jansson
+-  ${JANSSON_SRC}
+-  ${JANSSON_HDR_PRIVATE}
+-  ${JANSSON_HDR_PUBLIC})
+ endif()
+
++add_library(janssonstatic STATIC
++   ${JANSSON_SRC}
++   ${JANSSON_HDR_PRIVATE}
++   ${JANSSON_HDR_PUBLIC})
++set_target_properties(janssonstatic PROPERTIES
++   OUTPUT_NAME jansson
++   POSITION_INDEPENDENT_CODE true)
++
+ if (JANSSON_EXAMPLES)
+   add_executable(simple_parse 
"${PROJECT_SOURCE_DIR}/examples/simple_parse.c")
+   target_link_libraries(simple_parse jansson)
+@@ -659,7 +661,7 @@ set_target_properties(jansson PROPERTIES PUBLIC_HEADER
+ #
+ option(JANSSON_INSTALL "Generate installation target" ON)
+ if (JANSSON_INSTALL)
+-install(TARGETS jansson
++install(TARGETS jansson janssonstatic
+ EXPORT JanssonTargets
+ LIBRARY DESTINATION "${JANSSON_INSTALL_LIB_DIR}" COMPONENT lib
+ ARCHIVE DESTINATION "${JANSSON_INSTALL_LIB_DIR}" COMPONENT lib
Index: pkg/PLIST
===
RCS file: /cvs/ports/devel/jansson/pkg/PLIST,v
retrieving revision 1.3
diff -u -r1.3 PLIST
--- pkg/PLIST   20 Mar 2015 13:28:23 -  1.3
+++ pkg/PLIST   12 Dec 2018 11:01:26 -
@@ -7,5 +7,6 @@
 lib/cmake/jansson/JanssonConfigVersion.cmake
 lib/cmake/jansson/JanssonTargets${MODCMAKE_BUILD_SUFFIX}
 lib/cmake/jansson/JanssonTargets.cmake
+lib/libjansson.a
 @lib lib/libjansson.so.${LIBjansson_VERSION}
 lib/pkgconfig/jansson.pc






Re: UPDATE: jansson (2.12)

2018-12-12 Thread Kirill Bychkov
On Tue, December 11, 2018 13:40, Stuart Henderson wrote:
> On 2018/12/11 18:47, YASUOKA Masahiko wrote:
>> Hi,
>>
>> The diff does the followings:
>>
>> - update to jansson-2.12
>> - include a static library
>> - use configure && make, instead of cmake
>>
>> My motivation was to include the static library, since I'd like to use
>> it within a statically linked CGI program.
>>
>> I had tried to modify CMakeLists.txt to build both static and shared
>> library, but it was not easy for me.  On the other hand, just doing
>> "configure && make" does it as the default.  I choiced "configure"
>> rather than cmake.  Is there any reason to keep using cmake?
>
> It needs testing with dependent ports either way, but the static
> library can be added to the cmake build like this:
>
> Index: Makefile

[...]

>

Hi!
Thanks for the diff needed to build static libs alogside shared one.
I think we could add it without updating jansson itself at this moment.
Update will follow after testing dependent ports.



Re: UPDATE: jansson (2.12)

2018-12-12 Thread YASUOKA Masahiko
On Tue, 11 Dec 2018 10:40:53 +
Stuart Henderson  wrote:
> On 2018/12/11 18:47, YASUOKA Masahiko wrote:
>> Hi,
>> 
>> The diff does the followings:
>> 
>> - update to jansson-2.12
>> - include a static library
>> - use configure && make, instead of cmake
>> 
>> My motivation was to include the static library, since I'd like to use
>> it within a statically linked CGI program.
>> 
>> I had tried to modify CMakeLists.txt to build both static and shared
>> library, but it was not easy for me.  On the other hand, just doing
>> "configure && make" does it as the default.  I choiced "configure"
>> rather than cmake.  Is there any reason to keep using cmake?
> 
> It needs testing with dependent ports either way, but the static
> library can be added to the cmake build like this:

Thanks,

"make test" in devel/jansson passed on amd64, aarch64 and mips64.  I
put the logs on the URLs following:

http://yasuoka.net/~yasuoka/tmp/jansson-2.12-test-amd64.txt
http://yasuoka.net/~yasuoka/tmp/jansson-2.12-test-octeon.txt
http://yasuoka.net/~yasuoka/tmp/jansson-2.12-test-arm64.txt

--yasuoka



Re: UPDATE: jansson (2.12)

2018-12-11 Thread Stuart Henderson
On 2018/12/11 18:47, YASUOKA Masahiko wrote:
> Hi,
> 
> The diff does the followings:
> 
> - update to jansson-2.12
> - include a static library
> - use configure && make, instead of cmake
> 
> My motivation was to include the static library, since I'd like to use
> it within a statically linked CGI program.
> 
> I had tried to modify CMakeLists.txt to build both static and shared
> library, but it was not easy for me.  On the other hand, just doing
> "configure && make" does it as the default.  I choiced "configure"
> rather than cmake.  Is there any reason to keep using cmake?

It needs testing with dependent ports either way, but the static
library can be added to the cmake build like this:

Index: Makefile
===
RCS file: /cvs/ports/devel/jansson/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile7 Sep 2018 11:10:30 -   1.12
+++ Makefile11 Dec 2018 10:39:11 -
@@ -2,9 +2,9 @@
 
 COMMENT =  library for manipulating JSON data
 
-DISTNAME = jansson-2.11
+DISTNAME = jansson-2.12
 
-SHARED_LIBS =  jansson 3.1
+SHARED_LIBS =  jansson 3.2
 
 CATEGORIES =   devel
 
@@ -19,7 +19,7 @@ MASTER_SITES =http://www.digip.org/jan
 
 MODULES =  devel/cmake
 
-CONFIGURE_ARGS +=  -DBUILD_SHARED_LIBS=ON \
+CONFIGURE_ARGS +=  -DJANSSON_BUILD_SHARED_LIBS=ON \
-DJANSSON_BUILD_DOCS=OFF \
-DJANSSON_EXAMPLES=OFF
 
Index: distinfo
===
RCS file: /cvs/ports/devel/jansson/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo7 Sep 2018 11:10:30 -   1.5
+++ distinfo11 Dec 2018 10:39:11 -
@@ -1,2 +1,2 @@
-SHA256 (jansson-2.11.tar.gz) = boX0Lavkmngx291tMNyoqWaVa1GppQ7VNLgq/D+lsvQ=
-SIZE (jansson-2.11.tar.gz) = 483686
+SHA256 (jansson-2.12.tar.gz) = X43sdlBI76xdkZre1RsmoyoFOX6iB6p2n/a1PHAn0sk=
+SIZE (jansson-2.12.tar.gz) = 489154
Index: patches/patch-CMakeLists_txt
===
RCS file: /cvs/ports/devel/jansson/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt7 Sep 2018 11:10:30 -   1.5
+++ patches/patch-CMakeLists_txt11 Dec 2018 10:39:11 -
@@ -1,13 +1,42 @@
-$OpenBSD: patch-CMakeLists_txt,v 1.5 2018/09/07 11:10:30 sthen Exp $
+$OpenBSD$
+
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -640,7 +640,7 @@ file(RELATIVE_PATH 
- # so that the include dirs are given relative to where the 
- # config file is located.
- set(JANSSON__INCLUDE_DIRS 
--"\${JANSSON_CMAKE_DIR}/${REL_INCLUDE_DIR}") 
-+"${CMAKE_INSTALL_PREFIX}/include") 
- configure_file(${PROJECT_SOURCE_DIR}/cmake/JanssonConfig.cmake.in
- 
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JanssonConfig.cmake 
- @ONLY)
+@@ -358,19 +358,19 @@ if(JANSSON_BUILD_SHARED_LIBS)
+   ${JANSSON_HDR_PRIVATE}
+   ${JANSSON_HDR_PUBLIC}
+   src/jansson.def)
+-
+set_target_properties(jansson PROPERTIES
+   VERSION ${JANSSON_VERSION}
+   SOVERSION ${JANSSON_SOVERSION})
+-else()
+-   add_library(jansson STATIC
+-  ${JANSSON_SRC}
+-  ${JANSSON_HDR_PRIVATE}
+-  ${JANSSON_HDR_PUBLIC})
+-   set_target_properties(jansson PROPERTIES
+-  POSITION_INDEPENDENT_CODE true)
+ endif()
+ 
++add_library(janssonstatic STATIC
++   ${JANSSON_SRC}
++   ${JANSSON_HDR_PRIVATE}
++   ${JANSSON_HDR_PUBLIC})
++set_target_properties(janssonstatic PROPERTIES
++   OUTPUT_NAME jansson
++   POSITION_INDEPENDENT_CODE true)
++
+ if (JANSSON_EXAMPLES)
+   add_executable(simple_parse 
"${CMAKE_CURRENT_SOURCE_DIR}/examples/simple_parse.c")
+   target_link_libraries(simple_parse jansson)
+@@ -652,7 +652,7 @@ configure_package_config_file(
+ #
+ option(JANSSON_INSTALL "Generate installation target" ON)
+ if (JANSSON_INSTALL)
+-  install(TARGETS jansson
++  install(TARGETS jansson janssonstatic
+   EXPORT janssonTargets
+   LIBRARY DESTINATION "lib"
+   ARCHIVE DESTINATION "lib"
Index: pkg/PLIST
===
RCS file: /cvs/ports/devel/jansson/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   20 Mar 2015 13:28:23 -  1.3
+++ pkg/PLIST   11 Dec 2018 10:39:11 -
@@ -3,9 +3,10 @@ include/jansson.h
 include/jansson_config.h
 lib/cmake/
 lib/cmake/jansson/
-lib/cmake/jansson/JanssonConfig.cmake
-lib/cmake/jansson/JanssonConfigVersion.cmake
-lib/cmake/jansson/JanssonTargets${MODCMAKE_BUILD_SUFFIX}
-lib/cmake/jansson/JanssonTargets.cmake
+lib/cmake/jansson/janssonConfig.cmake
+lib/cmake/jansson/janssonConfigVersion.cmake
+lib/cmake/jansson/janssonTargets${MODCMAKE_BUILD_SUFFIX}
+lib/cmake/jansson/janssonTargets.cmake

UPDATE: jansson (2.12)

2018-12-11 Thread YASUOKA Masahiko
Hi,

The diff does the followings:

- update to jansson-2.12
- include a static library
- use configure && make, instead of cmake

My motivation was to include the static library, since I'd like to use
it within a statically linked CGI program.

I had tried to modify CMakeLists.txt to build both static and shared
library, but it was not easy for me.  On the other hand, just doing
"configure && make" does it as the default.  I choiced "configure"
rather than cmake.  Is there any reason to keep using cmake?

Index: Makefile
===
RCS file: /cvs/ports/devel/jansson/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile7 Sep 2018 11:10:30 -   1.12
+++ Makefile11 Dec 2018 09:47:05 -
@@ -2,9 +2,9 @@
 
 COMMENT =  library for manipulating JSON data
 
-DISTNAME = jansson-2.11
+DISTNAME = jansson-2.12
 
-SHARED_LIBS =  jansson 3.1
+SHARED_LIBS =  jansson 3.2
 
 CATEGORIES =   devel
 
@@ -17,10 +17,6 @@ PERMIT_PACKAGE_CDROM =   Yes
 
 MASTER_SITES = http://www.digip.org/jansson/releases/
 
-MODULES =  devel/cmake
-
-CONFIGURE_ARGS +=  -DBUILD_SHARED_LIBS=ON \
-   -DJANSSON_BUILD_DOCS=OFF \
-   -DJANSSON_EXAMPLES=OFF
+CONFIGURE_STYLE =  gnu
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/devel/jansson/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo7 Sep 2018 11:10:30 -   1.5
+++ distinfo11 Dec 2018 09:47:05 -
@@ -1,2 +1,2 @@
-SHA256 (jansson-2.11.tar.gz) = boX0Lavkmngx291tMNyoqWaVa1GppQ7VNLgq/D+lsvQ=
-SIZE (jansson-2.11.tar.gz) = 483686
+SHA256 (jansson-2.12.tar.gz) = X43sdlBI76xdkZre1RsmoyoFOX6iB6p2n/a1PHAn0sk=
+SIZE (jansson-2.12.tar.gz) = 489154
Index: patches/patch-CMakeLists_txt
===
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt7 Sep 2018 11:10:30 -   1.5
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,13 +0,0 @@
-$OpenBSD: patch-CMakeLists_txt,v 1.5 2018/09/07 11:10:30 sthen Exp $
-Index: CMakeLists.txt
 CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -640,7 +640,7 @@ file(RELATIVE_PATH 
- # so that the include dirs are given relative to where the 
- # config file is located.
- set(JANSSON__INCLUDE_DIRS 
--"\${JANSSON_CMAKE_DIR}/${REL_INCLUDE_DIR}") 
-+"${CMAKE_INSTALL_PREFIX}/include") 
- configure_file(${PROJECT_SOURCE_DIR}/cmake/JanssonConfig.cmake.in
- 
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/JanssonConfig.cmake 
- @ONLY)
Index: pkg/PLIST
===
RCS file: /cvs/ports/devel/jansson/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   20 Mar 2015 13:28:23 -  1.3
+++ pkg/PLIST   11 Dec 2018 09:47:05 -
@@ -1,11 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.3 2015/03/20 13:28:23 kirby Exp $
 include/jansson.h
 include/jansson_config.h
-lib/cmake/
-lib/cmake/jansson/
-lib/cmake/jansson/JanssonConfig.cmake
-lib/cmake/jansson/JanssonConfigVersion.cmake
-lib/cmake/jansson/JanssonTargets${MODCMAKE_BUILD_SUFFIX}
-lib/cmake/jansson/JanssonTargets.cmake
+lib/libjansson.a
+lib/libjansson.la
 @lib lib/libjansson.so.${LIBjansson_VERSION}
 lib/pkgconfig/jansson.pc