Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New package: dino-0.1.0 #18648

Merged
merged 1 commit into from
Feb 7, 2020
Merged

New package: dino-0.1.0 #18648

merged 1 commit into from
Feb 7, 2020

Conversation

anjandev
Copy link
Contributor

No description provided.

@anjandev anjandev changed the title New package: dino-0.1.0 [WIP] New package: dino-0.1.0 Jan 30, 2020
@anjandev
Copy link
Contributor Author

As discussed in irc, dino's configure script is not portable. Also, makedepends=cmake is required because the ./configure script requires it

@Johnnynator
Copy link
Member

Ignore the configure script and use cmake directly.

@anjandev
Copy link
Contributor Author

@Johnnynator This advice fixed alot of the issues I was getting but I still have the following error:

/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/libsignal-protocol-c.a(curve.c.o): relocation R_X86_64_PC32 against symbol `ec_public_key_destroy' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/omemo/CMakeFiles/omemo.dir/build.make:626: plugins/omemo.so] Error 1
make[2]: Leaving directory '/builddir/dino-0.1.0'
make[1]: *** [CMakeFiles/Makefile2:731: plugins/omemo/CMakeFiles/omemo.dir/all] Error 2
make[1]: Leaving directory '/builddir/dino-0.1.0'
make: *** [Makefile:130: all] Error 2
=> ERROR: dino-0.1.0_1: do_build: 'make' exited with 2
=> ERROR:   in do_build() at srcpkgs/dino/template:18
The command "if [ -z "$XLINT" ]; then docker exec -t void hostrepo/common/travis/build.sh $BOOTSTRAP $ARCH; fi" exited with 1.

Any ideas?

distfiles="https://github.com/dino/dino/archive/v${version}.tar.gz"
checksum="202b7db322d85389b0bebc3c38976e7f7beaceddd1fc46b8123e50c6c7c07b8d"

do_build() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove and set build_style=cmake

srcpkgs/dino/template Outdated Show resolved Hide resolved
srcpkgs/dino/template Outdated Show resolved Hide resolved
make_build_target=dino
hostmakedepends="gettext unzip pkg-config ninja vala"
makedepends="cmake glib-devel qrencode-devel gtk+3-devel gpgme-devel libgee08-devel libgcrypt-devel libsoup-devel libsignal-protocol-c sqlite-devel"
depends="gettext glib glib-networking qrencode gtk+3 gpgme libgee08 libgcrypt libqrencode libsoup"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are probably auto detected by shlibs.

srcpkgs/dino/template Outdated Show resolved Hide resolved
revision=1
make_build_target=dino
hostmakedepends="gettext unzip pkg-config ninja vala"
makedepends="cmake glib-devel qrencode-devel gtk+3-devel gpgme-devel libgee08-devel libgcrypt-devel libsoup-devel libsignal-protocol-c sqlite-devel"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake not needed in here, also add a newline after like 60-70 chars.

@faulesocke
Copy link
Contributor

I once tried packaging it with this, don't know if it worked:

# Template file for 'dino'
pkgname=dino
version=0.0git
revision=1
wrksrc=$pkgname
build_style=gnu-configure
configure_args="--enable-plugin=gpgme-vala --enable-plugin=http-files --enable-plugin=notification-sound --enable-plugin=omemo --enable-plugin=openpgp --enable-plugin=signal-protocol"
hostmakedepends="git"
makedepends="cmake pkg-config gettext ninja vala glib-devel gtk+3-devel gpgme-devel libgee08-devel libgcrypt-devel qrencode-devel libsoup-devel sqlite-devel libcanberra-devel"
short_desc="Modern XMPP/Jabber Chat Client using GTK+/Vala"
maintainer="Urs Schulz <voidpkgs@ursschulz.de>"
license="GPL-3.0-or-later"
homepage="https://dino.im/"


do_fetch() {
	git clone "https://github.com/dino/dino"
	cd dino
	version="${version}$(git rev-parse --short HEAD)"
}

do_extract() {
	true
}

Maybe this helps.

@ghost
Copy link

ghost commented Jan 31, 2020

@anjandev doing ./configure --with-libsignal-in-tree worked for me, but i suppose it doesn't make sense in a package

@anjandev
Copy link
Contributor Author

anjandev commented Feb 1, 2020

@anjandev doing ./configure --with-libsignal-in-tree worked for me, but i suppose it doesn't make sense in a package

Im sorry, that didnt work for me. Would you mind posting the full template? Also, what are the implications of --with-libsignal-in-tree?

@faulesocke
I tried running this template and it didnt work.

The main issue with my template is the make file breaks at

[ 11%] Built target xmpp-vala-vapi
make[2]: Leaving directory '/builddir/dino-0.1.0/build'
make[1]: *** [CMakeFiles/Makefile2:511: main/CMakeFiles/dino.dir/rule] Error 2
make[1]: Leaving directory '/builddir/dino-0.1.0/build'
make: *** [Makefile:255: dino] Error 2
=> ERROR: dino-0.1.0_1: do_build: '${make_cmd} ${makejobs} ${make_build_args} ${make_build_target}' exited with 2
=> ERROR:   in do_build() at common/build-style/cmake.sh:73

If I run ./xbps-src pkg dino again after it fails at 11%, my template will compile dino completely but fail at 100%.

[100%] Linking C shared library ../omemo.so
/usr/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/libsignal-protocol-c.a(curve.c.o): relocation R_X86_64_PC32 against symbol `ec_public_key_destroy' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/omemo/CMakeFiles/omemo.dir/build.make:626: plugins/omemo.so] Error 1
make[2]: Leaving directory '/builddir/dino-0.1.0/build'
make[1]: *** [CMakeFiles/Makefile2:731: plugins/omemo/CMakeFiles/omemo.dir/all] Error 2
make[1]: Leaving directory '/builddir/dino-0.1.0/build'
make: *** [Makefile:130: all] Error 2
=> ERROR: dino-0.1.0_1: do_install: '${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target}' exited with 2
=> ERROR:   in do_install() at common/build-style/cmake.sh:101

There is a dino binary in masterdir/builddir/dino-0.1.0/build/ that runs but I have no idea why xbps-src fails to get to the install phase.

@ghost
Copy link

ghost commented Feb 1, 2020

Im sorry, that didnt work for me. Would you mind posting the full template? Also, what are the implications of --with-libsignal-in-tree?

i had that exact error and it was solved by that flag. it compiles libsignal-protocol-c by itself instead of using the system one (void's might be the wrong version). i don't have a template, i compiled it myself. see https://github.com/dino/dino/wiki/Build#libsignal-protocol-c

@ghost
Copy link

ghost commented Feb 1, 2020

i made a post (in spanish, but the commands are in english :) about how i compiled it: https://void.partidopirata.com.ar/2020/01/30/instalar-dino-en-void-linux/

common/shlibs Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Feb 3, 2020

Maybe https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/dino helps?

# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=dino
pkgver=0.1.0
pkgrel=2
pkgdesc="Modern XMPP (Jabber) chat client written in Vala"
arch=(x86_64)
url="https://github.com/dino/dino"
license=(GPL3)
depends=(glib2 glib-networking gtk3 gpgme libgee libgcrypt libsignal-protocol-c
         libsoup sqlite qrencode libcanberra)
makedepends=(git cmake vala ninja)
source=(${url}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz{,.asc})
sha256sums=('100542fcf05781f37f5a871489affe0a82f205cd15e3d0d3cdfd717fa1149835' 'SKIP')
validpgpkeys=(A32134DD19952FB12EC43E4501FABCC83FEA225E)

build() {
    cmake -G Ninja -B build -S ${pkgname}-${pkgver} \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DDINO_PLUGIN_ENABLED_notification-sound=ON
    ninja -C build
}

package() {
    DESTDIR="${pkgdir}" ninja -C build install
}

i think it would make sense to first try to package the easiest possible way. so without plugins, packaging seems easier. That means, try first to get the plain dino package working and when that works, try to get omemo and other plugins working in another PR.

@ghost
Copy link

ghost commented Feb 3, 2020

personally i agree with the plugins thing but it's very important that by the time it's on the repos it has the plugins, as without them users will be confused as to why omemo isn't working.

@anjandev
Copy link
Contributor Author

anjandev commented Feb 4, 2020

Thanks for the feedback guys. I have half an evening free so I'll see what I can do.

@anjandev
Copy link
Contributor Author

anjandev commented Feb 4, 2020

@toogley thank you for the example build script. The current commit in this PR compiles dino to completion without plugins. I referenced your build script and libcanberra-devel was added but might not be needed - I need to do some testing on whether this dependency is needed.

Enabling the omemo plugin causes a linking error. Getting dino to compile without plugins is a good stepping stone but as @v0idifier has stated, dino was created to make encrypted communication easy and the default. I need fix omemo before this package can be merged with void repos. Any suggestions or help is much appreciated!

@ghost
Copy link

ghost commented Feb 4, 2020

I think i have managed to build dino directly some weeks ago (that means: not as void linux package and instead as a binary directly from the dino repository).

I think i have used this command at that time: ./configure --enable-plugin=omemo && make
However, that fails at the moment with this error:

FAILED: plugins/omemo.so 
: && /bin/cc -fPIC -fdiagnostics-color -Wall -Wextra -Werror=format-security -Wno-duplicate-decl-specifier -g -O2 -g -DNDEBUG   -shared -Wl,-soname,omemo.so -o plugins/omemo.so plugins/omemo/CMakeFiles/omemo.dir/src/plugin.c.o plugins/omemo/CMakeFiles/omemo.dir/src/register_plugin.c.o plugins/omemo/CMakeFiles/omemo.dir/src/trust_level.c.o plugins/omemo/CMakeFiles/omemo.dir/src/file_transfer/file_decryptor.c.o plugins/omemo/CMakeFiles/omemo.dir/src/file_transfer/file_encryptor.c.o plugins/omemo/CMakeFiles/omemo.dir/src/jingle/jingle_helper.c.o plugins/omemo/CMakeFiles/omemo.dir/src/jingle/jet_omemo.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/database.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/encrypt_state.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/manager.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/pre_key_store.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/session_store.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/signed_pre_key_store.c.o plugins/omemo/CMakeFiles/omemo.dir/src/logic/trust_manager.c.o plugins/omemo/CMakeFiles/omemo.dir/src/protocol/bundle.c.o plugins/omemo/CMakeFiles/omemo.dir/src/protocol/message_flag.c.o plugins/omemo/CMakeFiles/omemo.dir/src/protocol/stream_module.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/account_settings_entry.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/account_settings_widget.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/contact_details_provider.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/contact_details_dialog.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/device_notification_populator.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/own_notifications.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/encryption_list_entry.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/manage_key_dialog.c.o plugins/omemo/CMakeFiles/omemo.dir/src/ui/util.c.o plugins/omemo/CMakeFiles/omemo.dir/resources/resources.c.o  -Wl,-rpath,/home/toogley/src/dino/build:  libdino.so.0.0  plugins/signal-protocol/libsignal-protocol-vala.a  plugins/crypto-vala/libcrypto-vala.a  libxmpp-vala.so.0.1  /usr/lib/libicuuc.so  /usr/lib/libicudata.so  libqlite.so.0.1  /usr/lib/libsqlite3.so  -lsignal-protocol-c  -lm  -lgcrypt  /usr/lib/libgee-0.8.so  /usr/lib/libgmodule-2.0.so  /usr/lib/libgtk-3.so  /usr/lib/libgdk-3.so  /usr/lib/libpangocairo-1.0.so  /usr/lib/libpango-1.0.so  /usr/lib/libatk-1.0.so  /usr/lib/libcairo-gobject.so  /usr/lib/libcairo.so  /usr/lib/libgdk_pixbuf-2.0.so  /usr/lib/libsoup-2.4.so  /usr/lib/libgio-2.0.so  /usr/lib/libgobject-2.0.so  /usr/lib/libglib-2.0.so  /usr/lib/libqrencode.so && :
/bin/ld: /usr/lib/gcc/x86_64-unknown-linux-gnu/9.2.0/../../../../lib/libsignal-protocol-c.a(curve.c.o): relocation R_X86_64_PC32 against symbol `ec_public_key_destroy' can not be used when making a shared object; recompile with -fPIC
/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:2: default] Error 1

I tought it would make sense to get dino working that way before packaging it into void to understand how the build script has to look inside voidlinux. Still investigating.

Also using ./configure --enable-plugin=omemo --with-libsignal-in-tree && make fails:

[238/364] Building C object plugins/signal-protocol/CMakeFiles/signal-protocol-vala.dir/src/util.c.o
util.c: In function 'signal_calculate_agreement':
util.c:225:7: warning: variable '_res_size_' set but not used [-Wunused-but-set-variable]
util.c: In function 'signal_carr_to_string':
util.c:361:7: warning: variable '_nu_size_' set but not used [-Wunused-but-set-variable]
[239/364] Building C object plugins/signal-protocol/libsignal...MakeFiles/signal-protocol-c.dir/LocalStorageProtocol.pb-c.c.o
FAILED: plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/LocalStorageProtocol.pb-c.c.o 
/bin/cc  -Iplugins/signal-protocol -Iexports -I../plugins/signal-protocol/libsignal-protocol-c/src/. -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519/nacl_includes -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519/additions -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519/sha512 -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519 -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519 -fdiagnostics-color -Wall -Wextra -Werror=format-security -Wno-duplicate-decl-specifier -g -fmessage-length=0 -Wall -Wmissing-field-initializers -Wno-missing-braces -Wparentheses -Wswitch -Wunused-variable -Wunused-value -Wshadow -Wint-conversion -Wpointer-sign -Wprotocol -Wshorten-64-to-32 -g -fPIC -MD -MT plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/LocalStorageProtocol.pb-c.c.o -MF plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/LocalStorageProtocol.pb-c.c.o.d -o plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/LocalStorageProtocol.pb-c.c.o   -c ../plugins/signal-protocol/libsignal-protocol-c/src/LocalStorageProtocol.pb-c.c
cc: error: unrecognized command line option '-Wshorten-64-to-32'
[240/364] Building C object plugins/signal-protocol/libsignal...CMakeFiles/signal-protocol-c.dir/WhisperTextProtocol.pb-c.c.o
FAILED: plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/WhisperTextProtocol.pb-c.c.o 
/bin/cc  -Iplugins/signal-protocol -Iexports -I../plugins/signal-protocol/libsignal-protocol-c/src/. -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519/nacl_includes -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519/additions -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519/sha512 -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519/ed25519 -I../plugins/signal-protocol/libsignal-protocol-c/src/curve25519 -fdiagnostics-color -Wall -Wextra -Werror=format-security -Wno-duplicate-decl-specifier -g -fmessage-length=0 -Wall -Wmissing-field-initializers -Wno-missing-braces -Wparentheses -Wswitch -Wunused-variable -Wunused-value -Wshadow -Wint-conversion -Wpointer-sign -Wprotocol -Wshorten-64-to-32 -g -fPIC -MD -MT plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/WhisperTextProtocol.pb-c.c.o -MF plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/WhisperTextProtocol.pb-c.c.o.d -o plugins/signal-protocol/libsignal-protocol-c/src/CMakeFiles/signal-protocol-c.dir/WhisperTextProtocol.pb-c.c.o   -c ../plugins/signal-protocol/libsignal-protocol-c/src/WhisperTextProtocol.pb-c.c
cc: error: unrecognized command line option '-Wshorten-64-to-32'
[241/364] Building C object plugins/signal-protocol/CMakeFiles/signal-protocol-vala.dir/src/store.c.o
store.c: In function '_vala_signal_identity_key_store_get_property':
store.c:1836:27: warning: variable 'self' set but not used [-Wunused-but-set-variable]
store.c: In function '_vala_signal_identity_key_store_set_property':
store.c:1856:27: warning: variable 'self' set but not used [-Wunused-but-set-variable]
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala: In function 'signal_store_iks_get_identity_key_pair':
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:115:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  115 |         public_data = new Buffer.from(store.identity_key_store.identity_key_public.get_data());
      |         ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:116:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  116 |         private_data = new Buffer.from(store.identity_key_store.identity_key_private.get_data());
      |          ^
store.c: In function 'signal_store_ss_load_session_func':
store.c:4003:8: warning: variable '__tmp1__size_' set but not used [-Wunused-but-set-variable]
store.c:3972:7: warning: variable '_tmp9__length1' set but not used [-Wunused-but-set-variable]
store.c:3970:7: warning: variable '_res_size_' set but not used [-Wunused-but-set-variable]
store.c: In function 'signal_store_pks_load_pre_key':
store.c:4796:8: warning: variable '__tmp1__size_' set but not used [-Wunused-but-set-variable]
store.c:4771:7: warning: variable '_tmp9__length1' set but not used [-Wunused-but-set-variable]
store.c:4769:7: warning: variable '_res_size_' set but not used [-Wunused-but-set-variable]
store.c: In function 'signal_store_spks_load_signed_pre_key':
store.c:5315:8: warning: variable '__tmp1__size_' set but not used [-Wunused-but-set-variable]
store.c:5290:7: warning: variable '_tmp9__length1' set but not used [-Wunused-but-set-variable]
store.c:5288:7: warning: variable '_res_size_' set but not used [-Wunused-but-set-variable]
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala: In function 'signal_store_construct':
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:301:23: warning: assignment to 'int (*)(const signal_protocol_address *, uint8_t *, size_t,  void *)' {aka 'int (*)(const struct signal_protocol_address *, unsigned char *, long unsigned int,  void *)'} from incompatible pointer type 'gint (*)(signal_protocol_address *, guint8 *, size_t,  void *)' {aka 'int (*)(struct signal_protocol_address *, unsigned char *, long unsigned int,  void *)'} [-Wincompatible-pointer-types]
  301 |         NativeIdentityKeyStore iks = NativeIdentityKeyStore() {
      |                       ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:301:29: warning: assignment to 'int (*)(const signal_protocol_address *, uint8_t *, size_t,  void *)' {aka 'int (*)(const struct signal_protocol_address *, unsigned char *, long unsigned int,  void *)'} from incompatible pointer type 'gint (*)(signal_protocol_address *, guint8 *, size_t,  void *)' {aka 'int (*)(struct signal_protocol_address *, unsigned char *, long unsigned int,  void *)'} [-Wincompatible-pointer-types]
  301 |         NativeIdentityKeyStore iks = NativeIdentityKeyStore() {
      |                             ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:311:27: warning: assignment to 'int (*)(signal_buffer **, signal_buffer **, const signal_protocol_address *, void *)' {aka 'int (*)(struct signal_buffer **, struct signal_buffer **, const struct signal_protocol_address *, void *)'} from incompatible pointer type 'gint (*)(signal_buffer **, signal_buffer **, signal_protocol_address *, void *)' {aka 'int (*)(struct signal_buffer **, struct signal_buffer **, struct signal_protocol_address *, void *)'} [-Wincompatible-pointer-types]
  311 |         NativeSessionStore ss = NativeSessionStore() {
      |                           ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:311:38: warning: assignment to 'int (*)(signal_int_list **, const char *, size_t,  void *)' {aka 'int (*)(struct signal_int_list **, const char *, long unsigned int,  void *)'} from incompatible pointer type 'gint (*)(signal_int_list **, gchar *, size_t,  void *)' {aka 'int (*)(struct signal_int_list **, char *, long unsigned int,  void *)'} [-Wincompatible-pointer-types]
  311 |         NativeSessionStore ss = NativeSessionStore() {
      |                                      ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:311:28: warning: assignment to 'int (*)(const signal_protocol_address *, uint8_t *, size_t,  uint8_t *, size_t,  void *)' {aka 'int (*)(const struct signal_protocol_address *, unsigned char *, long unsigned int,  unsigned char *, long unsigned int,  void *)'} from incompatible pointer type 'gint (*)(signal_protocol_address *, guint8 *, size_t,  guint8 *, size_t,  void *)' {aka 'int (*)(struct signal_protocol_address *, unsigned char *, long unsigned int,  unsigned char *, long unsigned int,  void *)'} [-Wincompatible-pointer-types]
  311 |         NativeSessionStore ss = NativeSessionStore() {
      |                            ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:311:31: warning: assignment to 'int (*)(const signal_protocol_address *, void *)' {aka 'int (*)(const struct signal_protocol_address *, void *)'} from incompatible pointer type 'gint (*)(signal_protocol_address *, void *)' {aka 'int (*)(struct signal_protocol_address *, void *)'} [-Wincompatible-pointer-types]
  311 |         NativeSessionStore ss = NativeSessionStore() {
      |                               ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:311:29: warning: assignment to 'int (*)(const signal_protocol_address *, void *)' {aka 'int (*)(const struct signal_protocol_address *, void *)'} from incompatible pointer type 'gint (*)(signal_protocol_address *, void *)' {aka 'int (*)(struct signal_protocol_address *, void *)'} [-Wincompatible-pointer-types]
  311 |         NativeSessionStore ss = NativeSessionStore() {
      |                             ^
/home/toogley/src/dino/plugins/signal-protocol/src/store.vala:311:34: warning: assignment to 'int (*)(const char *, size_t,  void *)' {aka 'int (*)(const char *, long unsigned int,  void *)'} from incompatible pointer type 'gint (*)(gchar *, size_t,  void *)' {aka 'int (*)(char *, long unsigned int,  void *)'} [-Wincompatible-pointer-types]
  311 |         NativeSessionStore ss = NativeSessionStore() {
      |                                  ^
ninja: build stopped: subcommand failed.
make: *** [Makefile:2: default] Error 1

@ghost
Copy link

ghost commented Feb 4, 2020

I noticed that the arch linux person also has omemo not made available in their archlinux pkg. Maybe the build also fails for them, when used with omemo?

@ghost
Copy link

ghost commented Feb 4, 2020

I ran make clean and then

./configure --with-libsignal-in-tree
make

and it still works for me. check out the deps i installed at https://void.partidopirata.com.ar/2020/01/30/instalar-dino-en-void-linux/

@Johnnynator
Copy link
Member

So I did take a quick look at it. First for indentation use 1 tab in e.g. functions and 1 space for a newline inside a variable. Secondly as I said USE the build style, it seems like the cmake script generates a not fully working Makefile, but the Ninja one seems to work. Pls apply these changes ontop of what the current PR and work from there.

diff --git a/srcpkgs/dino/template b/srcpkgs/dino/template
index 763e0b05dd..ed6f81e33c 100644
--- a/srcpkgs/dino/template
+++ b/srcpkgs/dino/template
@@ -2,10 +2,14 @@
 pkgname=dino
 version=0.1.0
 revision=1
-hostmakedepends="cmake ninja gettext unzip pkg-config vala"
+build_style=cmake
+configure_args="-G Ninja -DDINO_PLUGIN_ENABLED_notification-sound=ON
+ -DDINO_PLUGIN_ENABLED_omemo=OFF"
+make_cmd=ninja
+hostmakedepends="cmake ninja gettext unzip pkg-config vala glib-devel"
 makedepends="glib-devel qrencode-devel gtk+3-devel gpgme-devel
-			libgee08-devel libgcrypt-devel libsoup-devel
-			libsignal-protocol-c sqlite-devel libcanberra-devel"
+ libgee08-devel libgcrypt-devel libsoup-devel
+ libsignal-protocol-c sqlite-devel libcanberra-devel"
 short_desc="Modern XMPP (\"Jabber\") Chat Client using GTK+/Vala"
 maintainer="Anjandev Momi <anjan@momi.ca>"
 license="GPL-3.0-or-later"
@@ -13,14 +17,6 @@ homepage="https://github.com/dino/dino"
 distfiles="https://github.com/dino/dino/archive/v${version}.tar.gz"
 checksum="202b7db322d85389b0bebc3c38976e7f7beaceddd1fc46b8123e50c6c7c07b8d"
 
-do_build() {
-		cmake -G Ninja -B build -S . \
-					-DCMAKE_INSTALL_PREFIX=/usr \
-					-DDINO_PLUGIN_ENABLED_notification-sound=ON \
-					-DDINO_PLUGIN_ENABLED_omemo=OFF
-		ninja -C build
-}
-
 do_install() {
-		vbin build/dino
+	vbin build/dino
 }

@sgn
Copy link
Member

sgn commented Feb 6, 2020

sgn@120864e
Patch for this package:

From ea2458baae15c6e560a499c8072c8066f1e801e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 6 Feb 2020 16:04:18 +0700
Subject: [PATCH] New package: dino-0.1.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 common/shlibs         |  3 +++
 srcpkgs/dino/template | 23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 srcpkgs/dino/template

diff --git a/common/shlibs b/common/shlibs
index 78e1d17864..16c430e695 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3798,3 +3798,6 @@ libmdnsd.so.0 libmdnsd-0.8_1
 libPtex.so ptex-2.3.2_1
 libosdGPU.so.3.4.0 OpenSubdiv-3.4.0_1
 libosdCPU.so.3.4.0 OpenSubdiv-3.4.0_1
+libdino.so.0 dino-0.1.0_1
+libxmpp-vala.so.0 dino-0.1.0_1
+libqlite.so.0 dino-0.1.0_1
diff --git a/srcpkgs/dino/template b/srcpkgs/dino/template
new file mode 100644
index 0000000000..14f1804fa7
--- /dev/null
+++ b/srcpkgs/dino/template
@@ -0,0 +1,23 @@
+# Template file for 'dino'
+pkgname=dino
+version=0.1.0
+revision=1
+build_style=cmake
+configure_args="-GNinja -DDINO_PLUGIN_ENABLED_notification-sound=ON
+ -DDINO_PLUGIN_ENABLED_omemo=OFF"
+make_cmd=ninja
+hostmakedepends="cmake ninja gettext unzip pkg-config vala glib-devel"
+makedepends="glib-devel qrencode-devel gtk+3-devel gpgme-devel
+ libgee08-devel libgcrypt-devel libsoup-devel
+ libsignal-protocol-c sqlite-devel libcanberra-devel"
+short_desc='Modern XMPP ("Jabber") Chat Client using GTK+/Vala'
+maintainer="Anjandev Momi <anjan@momi.ca>"
+license="GPL-3.0-or-later"
+homepage="https://github.com/dino/dino"
+distfiles="https://github.com/dino/dino/archive/v${version}.tar.gz"
+checksum="202b7db322d85389b0bebc3c38976e7f7beaceddd1fc46b8123e50c6c7c07b8d"
+
+post_install() {
+	rm -rf ${DESTDIR}/usr/include
+	rm -rf ${DESTDIR}/usr/lib/*.so
+}
-- 
2.25.0.191.gde93cc14ab

@Johnnynator
Copy link
Member

b089612 You should be able to enable omemo now.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Co-authored-by: Ogromny <ogromnycoding@gmail.com>
@anjandev
Copy link
Contributor Author

anjandev commented Feb 6, 2020

I enabled omemo and merged @sgn's changes. I just sent my first omemo message using dino on void! This PR should be ready to be merged. Thanks for helping me everyone.

@anjandev anjandev changed the title [WIP] New package: dino-0.1.0 New package: dino-0.1.0 Feb 6, 2020
@q66
Copy link
Contributor

q66 commented Feb 7, 2020

Doing a build now, let's see.

@q66
Copy link
Contributor

q66 commented Feb 7, 2020

Built, tested. Works even on a big endian powermac g5 :P

@q66 q66 merged commit cccc08c into void-linux:master Feb 7, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants