Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] Package Request: gtk-youtube-viewer & dependencies
Date: Fri, 06 Nov 2020 13:42:12 +0100	[thread overview]
Message-ID: <20201106124212.0vNarN9gJ9yjv1mgRrm5ohMnUmBlNDOmJ5sJeUyDzC0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-3912@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 5526 bytes --]

Closed issue by johnny-mac on void-packages repository

https://github.com/void-linux/void-packages/issues/3912

Description:
I can somehow figure out all of this stuff, but I just can't seem to wrap my head around how git works... I've tried everything & git still makes no sense to me. I know how to git clone... that's it. Feel free to take these, change them, submit them, you can change the maintainer name - I am fine with that.

```
# Template file for 'gtk-youtube-viewer'
pkgname=gtk-youtube-viewer
_pkgname=youtube-viewer
version=3.5.0
revision=1
noarch=yes
wrksrc="${_pkgname}-${version}"
build_style=perl-ModuleBuild
configure_args="--gtk"
hostmakedepends="perl-Module-Build perl perl-Data-Dump perl-JSON perl-LWP-Protocol-https perl-Term-ReadLine-Gnu
 perl-JSON perl-JSON-XS perl-Test-Exception perl-Test-MockModule perl-Gtk2 perl-Test-MockObject
 perl-Unicode-LineBreak perl-Text-CharWidth perl-File-ShareDir perl-LWP-UserAgent-Cached"
makedepends="perl"
depends="${hostmakedepends}"
short_desc="GTK client to search and stream from YouTube"
maintainer="Johnny-Mac <johnny-mac@linuxmail.org>"
license="Artistic-2.0"
homepage="https://github.com/trizen/youtube-viewer"
#changelog="https://github.com/trizen/youtube-viewer/releases"
distfiles="https://github.com/trizen/${_pkgname}/archive/${version}.tar.gz"
checksum=cfc87679f04653f43f54b432ae36426083058cdeb39c34042a53c9eefa898598
conflicts="youtube-viewer>=0"
```

Dependencies:
(yes, perl-Test-MockObject is different from MockModule)
```
# Template file for 'perl-Test-MockObject'
pkgname=perl-Test-MockObject
version=1.20161202
revision=1
wrksrc="${pkgname#*-}-${version}"
build_style=perl-module
hostmakedepends="perl perl-Sub-Uplevel"
makedepends="perl"
depends="${hostmakedepends}"
noarch=yes
short_desc="Perl extension for emulating troublesome interfaces"
maintainer="Johnny-Mac <johnny-mac@linuxmail.org>"
license="Artistic, GPL-1"
homepage="https://metacpan.org/release/Test-MockObject"
distfiles="${CPAN_SITE}/Test/Test-MockObject-${version}.tar.gz"
checksum=14b225fff3645338697976dbbe2c39e44c1c93536855b78b3bbc6e9bfe94a0a2
```

```
# Template file for 'perl-Test-Mock-LWP-Dispatch'
pkgname=perl-Test-Mock-LWP-Dispatch
version=0.08
revision=1
wrksrc="${pkgname#*-}-${version}"
build_style=perl-module
hostmakedepends="perl perl-LWP perl-Test-MockObject"
makedepends="perl-Test-Exception"
depends="${hostmakedepends}"
noarch=yes
short_desc="Mocks LWP::UserAgent and dispatches your requests/responses"
maintainer="Johnny-Mac <johnny-mac@linuxmail.org>"
license="Artistic, GPL-1"
homepage="https://metacpan.org/release/Test-Mock-LWP-Dispatch"
distfiles="$CPAN_SITE/Test/Test-Mock-LWP-Dispatch-${version}.tar.gz"
checksum=134bb2df2bf2e14c3e86d0d6887081140d9605f66054dc5b733e4e7c42f5b56c
```

```
# Template file for 'perl-LWP-UserAgent-Cached'
pkgname=perl-LWP-UserAgent-Cached
version=0.06
revision=1
wrksrc="${pkgname#*-}-${version}"
build_style=perl-module
hostmakedepends="perl perl-Test-Mock-LWP-Dispatch perl-LWP"
makedepends="perl"
depends="${hostmakedepends}"
noarch=yes
short_desc="LWP::UserAgent with simple caching mechanism"
maintainer="Johnny-Mac <johnny-mac@linuxmail.org>"
license="Artistic, GPL-1"
homepage="https://metacpan.org/release/LWP-UserAgent-Cached"
distfiles="https://cpan.metacpan.org/authors/id/O/OL/OLEG/LWP-UserAgent-Cached-${version}.tar.gz"
checksum=33cb546ca990d2e4b6ea6924fb8894b3e31ff566776efa1247991c56c85ace9b
```

and, the build-style... I just added --gtk to the perl-ModuleBuild one & changed the name to add GTK at the end.

```
#
# This helper does the required steps to be able to build and install
# perl modules with the Module::Build method into the correct location.
#
# Required vars to be set by a template:
#
# 	build_style=perl-ModuleBuildGTK
#
do_configure() {
	if [ -f Build.PL ]; then
		# When cross compiling Module::Build reads in the build flags from the host perl, not the target:
		# extract the target specific flags (the ones also set in perl’s template) from
		# the target perl configuration and use them to override Module::Build’s default
		_conf="${XBPS_CROSS_BASE}/usr/lib/perl5/core_perl/Config_heavy.pl"
		_optimize=$(sed -n "s;^optimize='\(.*\)';\1;p" $_conf)
		_ccflags=$(sed -n "s;^ccflags='\(.*\)';\1;p" $_conf)
		_lddlflags=$(sed -n "s;^lddlflags='\(.*\)';\1;p" $_conf)
		_ldflags=$(sed -n "s;^ldflags='\(.*\)';\1;p" $_conf)
		_archlibexp=$(sed -n "s;^archlibexp='\(.*\)';\1;p" $_conf)

		PERL_MM_USE_DEFAULT=1 PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$DESTDIR'" \
			PERL_MB_OPT="--installdirs vendor --destdir '$DESTDIR'" \
			LD="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
			perl Build.PL --gtk --config optimize="$_optimize" --config ccflags="$_ccflags" \
			--config lddlflags="$_lddlflags" --config ldflags="$_ldflags" \
			--config archlibexp="${XBPS_CROSS_BASE}${_archlibexp}" \
			${configure_args} INSTALLDIRS=vendor
	else
		msg_error "$pkgver: cannot find Build.PL for perl module!\n"
	fi
}

do_build() {
	if [ ! -x ./Build ]; then
		msg_error "$pkgver: cannot find ./Build script!\n"
	fi
	LD="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ./Build ${make_build_args}
}

do_check() {
	if [ ! -x ./Build ]; then
		msg_error "$pkgver: cannot find ./Build script!\n"
	fi
	./Build test
}

do_install() {
	if [ ! -x ./Build ]; then
		msg_error "$pkgver: cannot find ./Build script!\n"
	fi
	./Build ${make_install_args} install
}
```

      parent reply	other threads:[~2020-11-06 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-3912@inbox.vuxu.org>
2020-11-06 12:42 ` ericonr
2020-11-06 12:42 ` ericonr [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201106124212.0vNarN9gJ9yjv1mgRrm5ohMnUmBlNDOmJ5sJeUyDzC0@z \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).