Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] PKGBUILD submarine → ebuild
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
tuwox
n00b
n00b


Joined: 07 Aug 2012
Posts: 0

PostPosted: Tue Aug 07, 2012 12:14 pm    Post subject: [SOLVED] PKGBUILD submarine → ebuild Reply with quote

Witam,

Wczoraj wpadłem na pomysł zainstalowania sobie submarine.
Konkretniej: przepisania Archowego PKGBUILDA na ebuilda. Zadanie niby proste, jednak wydaje się, że mnie przerosło. Cóż, przyznaję się bez bicia - gentoo mam od kilku dni, więc wszelkie tajniki pisania magicznych ebuildów nie są mi znajome.
PKGBUILDów nie pisałem, więc postanowiłem chociaż trochę poznać ebuildy. Dobra, wszystko fajnie, napisałem, jednak próby kompilacji się nie powiodły. Ba, nawet do niej nie doszło. Zaktualizowałem automake do wersji 1.12.2 w nadziei, że coś jednak ruszy - no, niby zaszło dalej, niż poprzednio. Poniżej widzimy kalekiego ebuilda mojego autorstwa:
Code:

# $Header: $
EAPI="4"
DESCRIPTION="Command-line program for searching and downloading the right
subtitles for movies"
HOMEPAGE="http://github.com/blazt/submarine"
SRC_URI="https://github.com/blazt/submarine/tarball/${PV} -> ${P}.tar.gz"
TAG_HASH="49b39de"
S="$WORKDIR/blazt-submarine-$TAG_HASH"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+vala"
RDEPEND="
vala? ( >=dev-lang/vala-0.16.1-r1 )
dev-libs/glib
app-arch/libarchive
dev-libs/libgee
net-libs/libsoup"
DEPEND="${RDEPEND}"
src_prepare() {
sed -i '/AM_SILENT_RULES/ a\AM_PROG_AR' "configure.ac"
}

src_compile() {
   ./autogen.sh
   econf --prefix=/usr \
   emake
}

src_install() {
   emake DESTDIR="${D}" install
}



Tak, zamieniłem autoreconf na skrypt upstreamu, bo wtedy w ogóle nie ruszało.
Jak na razie próba instalacji kończy się następująco: [build.log]
Code:
 * Package:    media-video/submarine-0.1.3
 * Repository: x-portage
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU vala
 * FEATURES:   ccache sandbox
>>> Unpacking source...
>>> Unpacking submarine-0.1.3.tar.gz to /var/tmp/portage/media-video/submarine-0.1.3/work
>>> Source unpacked in /var/tmp/portage/media-video/submarine-0.1.3/work
>>> Preparing source in /var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de ...
autoreconf-2.68: Entering directory `.'
autoreconf-2.68: configure.ac: not using Gettext
autoreconf-2.68: running: aclocal -I m4
autoreconf-2.68: configure.ac: tracing
autoreconf-2.68: configure.ac: creating directory build-aux
autoreconf-2.68: running: libtoolize --copy
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf-2.68: running: /usr/bin/autoconf-2.68
autoreconf-2.68: running: /usr/bin/autoheader-2.68
autoreconf-2.68: running: automake --add-missing --copy --no-force
configure.ac:8: installing 'build-aux/ar-lib'
configure.ac:19: installing 'build-aux/compile'
configure.ac:16: installing 'build-aux/config.guess'
configure.ac:16: installing 'build-aux/config.sub'
configure.ac:6: installing 'build-aux/install-sh'
configure.ac:6: installing 'build-aux/missing'
lib/Makefile.am: installing 'build-aux/depcomp'
autoreconf-2.68: Leaving directory `.'
 * QA Notice: econf called in src_compile instead of src_configure
 * econf: updating blazt-submarine-49b39de/build-aux/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating blazt-submarine-49b39de/build-aux/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking --prefix=/usr emake
configure: WARNING: you should use --build, --host, --target
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking dependency style of x86_64-pc-linux-gnu-gcc... none
checking for x86_64-pc-linux-gnu-ar... x86_64-pc-linux-gnu-ar
checking the archiver (x86_64-pc-linux-gnu-ar) interface... ar
checking for x86_64-pc-linux-gnu-ar... (cached) x86_64-pc-linux-gnu-ar
checking the archiver (x86_64-pc-linux-gnu-ar) interface... (cached) ar
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by x86_64-pc-linux-gnu-gcc... /usr/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object files... -r
checking for x86_64-pc-linux-gnu-objdump... x86_64-pc-linux-gnu-objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-pc-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64-pc-linux-gnu-ar... (cached) x86_64-pc-linux-gnu-ar
checking for archiver @FILE support... @
checking for x86_64-pc-linux-gnu-strip... x86_64-pc-linux-gnu-strip
checking for x86_64-pc-linux-gnu-ranlib... x86_64-pc-linux-gnu-ranlib
checking command to parse /usr/bin/nm -B output from x86_64-pc-linux-gnu-gcc object... ok
checking for sysroot... no
checking for x86_64-pc-linux-gnu-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if x86_64-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-pc-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
checking if x86_64-pc-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
checking if x86_64-pc-linux-gnu-gcc static flag -static works... yes
checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... yes
checking if x86_64-pc-linux-gnu-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-pc-linux-gnu-gcc linker (/usr/x86_64-pc-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking dependency style of x86_64-pc-linux-gnu-gcc... (cached) none
checking whether x86_64-pc-linux-gnu-gcc and cc understand -c and -o together... yes
checking for valac... no
configure: WARNING: No Vala compiler found.  You will not be able to compile .vala source files.
checking for x86_64-pc-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSUBMARINE... yes
checking for SUBMARINE... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating submarine/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
>>> Source compiled.
>>> Test phase [not enabled]: media-video/submarine-0.1.3

>>> Install submarine-0.1.3 into /var/tmp/portage/media-video/submarine-0.1.3/image/ category media-video
make -j3 DESTDIR=/var/tmp/portage/media-video/submarine-0.1.3/image/ install
Making install in lib
make[1]: Entering directory `/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de/lib'
  VALAC    libsubmarine_la_vala.stamp
/bin/sh: --pkg: command not found
make[1]: *** [libsubmarine_la_vala.stamp] Error 127
make[1]: Leaving directory `/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de/lib'
make: *** [install-recursive] Error 1
 * ERROR: media-video/submarine-0.1.3 failed (install phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=media-video/submarine-0.1.3'`,
 * the complete build log and the output of `emerge -pqv '=media-video/submarine-0.1.3'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/media-video/submarine-0.1.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/submarine-0.1.3/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de'
 * S: '/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de'



Z góry dzięki za wszelkie rady prowadzące do rozwiązania mojego arcytrudnego problemu ;)


Last edited by tuwox on Tue Aug 07, 2012 7:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
SlashBeast
Moderator
Moderator


Joined: 23 May 2006
Posts: 2821

PostPosted: Tue Aug 07, 2012 1:05 pm    Post subject: Reply with quote

src_install i src_compile wyrzucil bym calkiem, dodal bym src_prepare i tam wrzucil 'eautoreconf' (najpierw 'inherit autotools') i wtedy sprawdz. Ten blad sugeruje, ze ktos dal ciala piszac skrypt instalacyjny, jest duza szansa, ze eautoreconf przebuduje go tak, by dzialal.
_________________
BitBucket -- better-initramfs to address many usecases and linux's limitations.
Back to top
View user's profile Send private message
tuwox
n00b
n00b


Joined: 07 Aug 2012
Posts: 0

PostPosted: Tue Aug 07, 2012 1:44 pm    Post subject: Reply with quote

Dodałem wg. zaleceń (albo coś zepsułem po drodze):
Code:
src_prepare() {
sed -i '/AM_SILENT_RULES/ a\AM_PROG_AR' "configure.ac"
inherit autotools
eautoreconf
emake
}


Wywala się tak:
Code:
 * Package:    media-video/submarine-0.1.3
 * Repository: x-portage
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU vala
 * FEATURES:   ccache sandbox
>>> Unpacking source...
>>> Unpacking submarine-0.1.3.tar.gz to /var/tmp/portage/media-video/submarine-0.1.3/work
>>> Source unpacked in /var/tmp/portage/media-video/submarine-0.1.3/work
>>> Preparing source in /var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de ...
 * QA Notice: ECLASS 'autotools' inherited illegally in media-video/submarine-0.1.3 prepare
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: IUSE: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: REQUIRED_USE: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: DEPEND: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: RDEPEND: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: PDEPEND: cannot unset: readonly variable
 * QA Notice: ECLASS 'libtool' inherited illegally in media-video/submarine-0.1.3 prepare
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: IUSE: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: REQUIRED_USE: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: DEPEND: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: RDEPEND: cannot unset: readonly variable
/usr/lib64/portage/bin/ebuild.sh: line 279: unset: PDEPEND: cannot unset: readonly variable
/usr/portage/eclass/libtool.eclass: line 33: DESCRIPTION: readonly variable
 * The ebuild phase 'prepare' has exited unexpectedly. This type of
 * behavior is known to be triggered by things such as failed variable
 * assignments (bug #190128) or bad substitution errors (bug #200313).
 * Normally, before exiting, bash should have displayed an error message
 * above. If bash did not produce an error message above, it's possible
 * that the ebuild has called `exit` when it should have called `die`
 * instead. This behavior may also be triggered by a corrupt bash binary or
 * a hardware problem such as memory or cpu malfunction. If the problem is
 * not reproducible or it appears to occur randomly, then it is likely to
 * be triggered by a hardware problem. If you suspect a hardware problem
 * then you should try some basic hardware diagnostics such as memtest.
 * Please do not report this as a bug unless it is consistently
 * reproducible and you are sure that your bash binary and hardware are
 * functioning properly.


Przenosząc "inherit autotools" pod EAPI, build.log wygląda tak:
Code:
 * Package:    media-video/submarine-0.1.3
 * Repository: x-portage
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU vala
 * FEATURES:   ccache sandbox
>>> Unpacking source...
>>> Unpacking submarine-0.1.3.tar.gz to /var/tmp/portage/media-video/submarine-0.1.3/work
>>> Source unpacked in /var/tmp/portage/media-video/submarine-0.1.3/work
>>> Preparing source in /var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de ...
 * Running eautoreconf in '/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de' ...
 * Running libtoolize --install --copy --force --automake ...
 [ ok ]
 * Running aclocal -I m4 ...
 [ ok ]
 * Running autoconf ...
 [ ok ]
 * Running autoheader ...
 [ ok ]
 * Running automake --add-missing --copy --foreign ...
 [ ok ]
 * Running elibtoolize in: blazt-submarine-49b39de/build-aux/
 *   Applying portage/1.2.0 patch ...
 *   Applying sed/1.5.6 patch ...
 *   Applying as-needed/2.2.6 patch ...
make -j3
make: *** No targets specified and no makefile found.  Stop.
 * ERROR: media-video/submarine-0.1.3 failed (prepare phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=media-video/submarine-0.1.3'`,
 * the complete build log and the output of `emerge -pqv '=media-video/submarine-0.1.3'`.
 * This ebuild is from an overlay named 'x-portage': '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/media-video/submarine-0.1.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/submarine-0.1.3/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de'
 * S: '/var/tmp/portage/media-video/submarine-0.1.3/work/blazt-submarine-49b39de'
Back to top
View user's profile Send private message
SlashBeast
Moderator
Moderator


Joined: 23 May 2006
Posts: 2821

PostPosted: Tue Aug 07, 2012 5:43 pm    Post subject: Reply with quote

Chodzilo mi raczej o cos takiego:

Code:
# $Header: $

EAPI="4"
inherit autotools
DESCRIPTION="Command-line program for searching and downloading the right subtitles for movies"
HOMEPAGE="http://github.com/blazt/submarine"
SRC_URI="https://github.com/blazt/submarine/tarball/${PV} -> ${P}.tar.gz"
TAG_HASH="49b39de"
S="$WORKDIR/blazt-submarine-$TAG_HASH"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+vala"
RDEPEND="
    vala? ( >=dev-lang/vala-0.16.1-r1 )
    dev-libs/glib
    app-arch/libarchive
    dev-libs/libgee
    net-libs/libsoup"
DEPEND="${RDEPEND}"

src_prepare() {
    sed -i '/AM_SILENT_RULES/ a\AM_PROG_AR' "configure.ac"
    eautoreconf
}


Nie ma potrzeby dodawania emake, jak nie wtawiasz src_compile to z automatu wskoczy.
_________________
BitBucket -- better-initramfs to address many usecases and linux's limitations.
Back to top
View user's profile Send private message
tuwox
n00b
n00b


Joined: 07 Aug 2012
Posts: 0

PostPosted: Tue Aug 07, 2012 7:51 pm    Post subject: Reply with quote

Problem jednak nie leży w samym ebuildzie. W pewnym momencie build.log wypluło, że nie ma vali
Code:
checking for valac... no
Z ciekawości odpaliłem ./configure, uprzednio linkując /usr/bin/vala-0.16 do /usr/bin/valac - przeszło. Poprawka powinna dotyczyć ebuilda vala. Widzę, że nawet chłopcy od vali na to wpadli, ale nie wymusili swoich poprawek w Gentoo.

EDIT: Wstawiłem export VALAC do valac-0.16, czego efektem jest udana kompilacja!
Tak czy siak, dzięki @SlashBeast.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum