From da72b3c2756b7f6a74bb3ee350b1830034829357 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 9 Jun 2018 16:12:47 +0200 Subject: [PATCH] net-im/lurch: make a lurch.exlib --- packages/net-im/lurch/lurch-scm.exheres-0 | 72 +------------------- packages/net-im/lurch/lurch.exlib | 82 +++++++++++++++++++++++ 2 files changed, 84 insertions(+), 70 deletions(-) create mode 100644 packages/net-im/lurch/lurch.exlib diff --git a/packages/net-im/lurch/lurch-scm.exheres-0 b/packages/net-im/lurch/lurch-scm.exheres-0 index 52b81622..8991e50b 100644 --- a/packages/net-im/lurch/lurch-scm.exheres-0 +++ b/packages/net-im/lurch/lurch-scm.exheres-0 @@ -1,76 +1,8 @@ -# Copyright 2017 Julian Ospald +# Copyright 2018 Julian Ospald # Distributed under the terms of the GNU General Public License v2 -SCM_REPOSITORY="https://github.com/gkdr/${PN}.git" -SCM_axc_REPOSITORY="https://github.com/gkdr/axc.git" -SCM_signal_REPOSITORY="https://github.com/WhisperSystems/libsignal-protocol-c.git" -SCM_omemo_REPOSITORY="https://github.com/gkdr/libomemo.git" -SCM_SECONDARY_REPOSITORIES=" - axc - signal - omemo -" -SCM_EXTERNAL_REFS=" - lib/axc:axc - lib/libomemo:omemo -" -SCM_axc_EXTERNAL_REFS=" - lib/libsignal-protocol-c:signal -" +require lurch -CMAKE_SOURCE=${WORK}/lib/axc/lib/libsignal-protocol-c - -require cmake [ api=2 out_of_source=false ] # don't let cmake mess with $WORK -require scm-git - -SUMMARY="OMEMO for libpurple - interoperable with other OMEMO clients" -HOMEPAGE="https://github.com/gkdr/${PN}" - -LICENCES="GPL-3" SLOT="0" PLATFORMS="~amd64 ~x86" -MYOPTIONS="" - -DEPENDENCIES=" - build: - sys-devel/libtool - virtual/pkg-config - build+run: - dev-db/sqlite:3 - dev-libs/Mini-XML - dev-libs/glib:2 - dev-libs/libgcrypt - dev-libs/libxml2:2.0 - net-im/pidgin -" - -BUGS_TO="hasufell@posteo.de" -REMOTE_IDS="github:gkdr/${PN}" - -CMAKE_SRC_CONFIGURE_PARAMS=( - -DCMAKE_C_FLAGS="${CFLAGS} -fPIC" -) - -src_prepare() { - # cmake part of libsignal-protocol-c - edo mkdir "${CMAKE_SOURCE}"/build - default -} - -src_configure() { - # cmake part of libsignal-protocol-c - edo cd "${CMAKE_SOURCE}"/build - cmake_src_configure -} - -src_compile() { - # cmake part of libsignal-protocol-c - emake -C "${CMAKE_SOURCE}"/build - - default -} - -src_install() { - default -} diff --git a/packages/net-im/lurch/lurch.exlib b/packages/net-im/lurch/lurch.exlib new file mode 100644 index 00000000..3d751ecf --- /dev/null +++ b/packages/net-im/lurch/lurch.exlib @@ -0,0 +1,82 @@ +# Copyright 2018 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +if ever is_scm ; then + SCM_REPOSITORY="https://github.com/gkdr/${PN}.git" + SCM_axc_REPOSITORY="https://github.com/gkdr/axc.git" + SCM_signal_REPOSITORY="https://github.com/WhisperSystems/libsignal-protocol-c.git" + SCM_omemo_REPOSITORY="https://github.com/gkdr/libomemo.git" + SCM_SECONDARY_REPOSITORIES=" + axc + signal + omemo + " + SCM_EXTERNAL_REFS=" + lib/axc:axc + lib/libomemo:omemo + " + SCM_axc_EXTERNAL_REFS=" + lib/libsignal-protocol-c:signal + " +fi + +if ! ever is_scm ; then + WORK="${WORKBASE}" +fi +CMAKE_SOURCE=${WORK}/lib/axc/lib/libsignal-protocol-c + +require cmake [ api=2 out_of_source=false ] # don't let cmake mess with $WORK +if ever is_scm ; then + require scm-git +else + DOWNLOADS="https://github.com/gkdr/lurch/releases/download/v${PV}/lurch-${PV}-src.tar.gz" +fi + +export_exlib_phases src_prepare src_configure src_compile + + +SUMMARY="OMEMO for libpurple - interoperable with other OMEMO clients" +HOMEPAGE="https://github.com/gkdr/${PN}" + +LICENCES="GPL-3" +MYOPTIONS="" + +DEPENDENCIES=" + build: + sys-devel/libtool + virtual/pkg-config + build+run: + dev-db/sqlite:3 + dev-libs/Mini-XML + dev-libs/glib:2 + dev-libs/libgcrypt + dev-libs/libxml2:2.0 + net-im/pidgin +" + +BUGS_TO="hasufell@posteo.de" +REMOTE_IDS="github:gkdr/${PN}" + +CMAKE_SRC_CONFIGURE_PARAMS=( + -DCMAKE_C_FLAGS="${CFLAGS} -fPIC" +) + +lurch_src_prepare() { + # cmake part of libsignal-protocol-c + edo mkdir "${CMAKE_SOURCE}"/build + default +} + +lurch_src_configure() { + # cmake part of libsignal-protocol-c + edo cd "${CMAKE_SOURCE}"/build + cmake_src_configure +} + +lurch_src_compile() { + # cmake part of libsignal-protocol-c + emake -C "${CMAKE_SOURCE}"/build + + default +} +