Porting gtranscode (Port created)

I try to port gtranscode. But I cannot fetch the file. This is Make file:

Code:
# New ports collection makefile for:   Ember
# Date created:        19 January 2012
# Whom:                Ember
#
# $FreeBSD$
#

PORTNAME=   gtranscode
PORTVERSION=    0.3
CATEGORIES= multimedia
MASTER_SITES=   http://fuzzymonkey.net/files/gtranscode-v0.3.tar.gz

MAINTAINER= sk8harddiefast@gmail.com
COMMENT=    Gtk for transcode

MAN1=       ember.1
MANCOMPRESSED=  yes
USE_MAKE=  yes

BUILD_DEPENDS= transcode:${PORTSDIR}/multimedia/transcode

.include <bsd.port.mk>

How to fetch it? I get this error

Code:
sudo make
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
=> gtranscode-0.3.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://fuzzymonkey.net/files/gtranscode-v0.3.tar.gzgtranscode-0.3.tar.gz
fetch: http://fuzzymonkey.net/files/gtranscode-v0.3.tar.gzgtranscode-0.3.tar.gz: Not Found
=> Attempting to fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/gtranscode-0.3.tar.gz
fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/gtranscode-0.3.tar.gz: File unavailable (e.g., file not found, no access)
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** Error code 1

Stop in /usr/home/ember/Desktop/Gtranscode.
 
Your MASTER_SITES is set incorrectly try:
Code:
MASTER_SITES=   http://fuzzymonkey.net/files/
instead.
 
Remove the filename from MASTER_SITES. Only put the website address there. The ports framework builds the filename using PORTNAME, PORTVERSION, and .tar.gz.

Or you can specify it yourself via the DISTFILE variable. Since the filename includes v0.3 instead of just 0.3, you'll have to do it manually. Add a DISTFILE line that has the name of the file:
Code:
DISTFILE=  $PORTNAME-v$PORTVERSION.tar.gz
(although the .tar.gz may not be needed).

Also, you'll want to confirm whether or not it uses GNU Make or BSD Make for the build Makefile inside the tarball. You may need to set USE_GMAKE instead of USE_MAKE. It's a rare piece of GTK software that doesn't use GNU Make (aka gmake).

Consider installing ports-mgmt/porttools and ports-mgmt/portlint as those will make it much easier to debug your port.
 
You probably also need to set DISTVERSION because the file to download doesn't fit nicely in ${DISTNAME}-${PORTVERSION}${EXTRACT_SUFX}.

Code:
DISTVERSION= v0.3
 
Ok. I made it. Now Fetch the file fine :)
My Makefile.
Code:
# New ports collection makefile for:   Ember
# Date created:        19 January 2012
# Whom:                Ember
#
# $FreeBSD$
#

PORTNAME=   gtranscode
PORTVERSION=    0.3
DISTVERSION=    v0.3
CATEGORIES= multimedia
MASTER_SITES=   http://fuzzymonkey.net/files/

MAINTAINER= sk8harddiefast@gmail.com
COMMENT=    Gtk for transcode

MAN1=       gtranscode.1
MANCOMPRESSED=  yes
USE_GMAKE=  yes

DISTFILE=  $PORTNAME-v$PORTVERSION
BUILD_DEPENDS= transcode:${PORTSDIR}/multimedia/transcode

.include <bsd.port.mk>

But something goes wrong.
Code:
ember ~/Desktop/gtranscode $ sudo make install clean
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
=> gtranscode-v0.3.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://fuzzymonkey.net/files/gtranscode-v0.3.tar.gz
gtranscode-v0.3.tar.gz                        100% of   19 kB  728 kBps
===>  Extracting for gtranscode-0.3
=> No checksum file (/usr/home/ember/Desktop/gtranscode/distinfo).
===>  Patching for gtranscode-0.3
===>   gtranscode-0.3 depends on executable: transcode - found
===>   gtranscode-0.3 depends on executable: gmake - found
===>   gtranscode-0.3 depends on executable: gmake - found
===>  Configuring for gtranscode-0.3
===>  Building for gtranscode-0.3
cd: /usr/home/ember/Desktop/gtranscode/work/gtranscode-v0.3: No such file or directory
*** Error code 2

Stop in /usr/home/ember/Desktop/gtranscode.
.

Try to go to this path:
Code:
cd: /usr/home/ember/Desktop/gtranscode/work/gtranscode-v0.3
but the path is:
Code:
cd: /usr/home/ember/Desktop/gtranscode/work/
 
Remove the DISTFILE from your Makefile. It's this name it uses for the work directory. If it's not set it'll automatically figure out to use DISTNAME (which is gtranscode).
 
If the Makefile that comes with gtranscode doesn't include an install target to do that automatically, then you have to do the copy manually in the port Makefile. See textproc/ripole for an example. And this chapter in the Porter's Handbook for an explanation of how it works.
 
I just attached gtranscode as it is now. I will try tomorrow to fix the last step.
For now:
-Fetch trancode
-Fetch gtranscode
-Build & install transcode
-Build gtranscode

Is not doing:
Copy the executable (gtranscode) from work directory to /usr/local/bin

But there is a message about that:
Code:
===>  Installing for gtranscode-0.3
===>   Generating temporary packing list
echo "There is no 'make install' for this program.  Just copy gtranscode somewhere in your path."
 

Attachments

  • gtranscode.tar.bz2
    560 bytes · Views: 165
Adding the following above the include line at the bottom should do it:
Code:
do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
 
Ok. I tried that but trying to install the port I get this error:
Code:
"Makefile", line 25: Need an operator
make: fatal errors encountered -- cannot continue
 
Make sure to use a tab to indent the line after do-install:, and not spaces.

If you install ports-mgmt/portlint, it can check for those kinds of errors like so # portlint -A /path/to/portdir

With output that includes the following:
Code:
WARN: Makefile: [23]: use tab (not space) to make indentation
 
Unfortunately I couldn't manage to compile gtranscode.
First I had no gtk-config installed (which comes with x11-toolkits/gtk12). So I would guess you should add a dependency to that, maybe something like:
Code:
BUILD_DEPENDS=  gtk-config:${PORTSDIR}/x11-toolkits/gtk12
I don't want to install gtk12 I patched the Makefile to use gtk20 (which uses pkg-config instead of gtk-config) like this:
Code:
--- Makefile~   2003-04-03 22:58:54.000000000 +0200
+++ Makefile    2012-01-24 22:55:45.000000000 +0100
@@ -1,6 +1,6 @@
 CC = gcc
 LDFLAGS = 
-GTKFLAGS = `gtk-config --libs` `gtk-config --cflags`
+GTKFLAGS = `pkg-config --libs gtk+-2.0` `pkg-config --cflags gtk+-2.0`
 
 all: gtranscode
I run into following error:
Code:
root@antec^[0]^23:03^/<1>ports/multimedia/gtranscode# make
===>  Building for gtranscode-0.3
gcc -g  `pkg-config --libs gtk+-2.0` `pkg-config --cflags gtk+-2.0` main.c tcprobe.c interface.c transcode.c -o gtranscode
interface.c: In function 'create_main_window':
interface.c:292: warning: incompatible implicit declaration of built-in function 'strrchr'
interface.c:419: warning: incompatible implicit declaration of built-in function 'strrchr'
interface.c: In function 'MakeTranscodeDialog':
interface.c:787: error: 'GTK_WINDOW_DIALOG' undeclared (first use in this function)
interface.c:787: error: (Each undeclared identifier is reported only once
interface.c:787: error: for each function it appears in.)
interface.c:796: warning: assignment makes pointer from integer without a cast
interface.c: In function 'ShowMessage':
interface.c:857: error: 'GTK_WINDOW_DIALOG' undeclared (first use in this function)
interface.c: In function 'FileselOK':
interface.c:1345: warning: assignment discards qualifiers from pointer target type
interface.c: In function 'FileselOKOutput':
interface.c:1361: warning: assignment discards qualifiers from pointer target type
interface.c: In function 'ProbeVideoFile':
interface.c:1394: warning: passing argument 1 of 'close' makes integer from pointer without a cast
gmake: *** [gtranscode] Error 1
*** Error code 1

Stop in /usr/ports/multimedia/gtranscode.
So I guess this wont work with gtk20 :(

The CHANGELOG states Jul 13, 2003 for the last version. Maybe we are too late for porting this?
 
Back
Top