2012年07月20日 Build of minidlna in Slackware-13.37
_ minidlna-1.1.0(cvs version)
- cvs -d:pserver:anonymous@minidlna.cvs.sourceforge.net:/cvsroot/minidlna login
- cvs -z3 -d:pserver:anonymous@minidlna.cvs.sourceforge.net:/cvsroot/minidlna co -P minidlna
- cd minidlna
- ./autogen.sh
- LIBS="-lavformat -lavcodec -lavutil -lm -lz -lbz2 -lpthread -ldl" ./configure
- make
- make install
minidlna-1.1.0 is easier to build than minidlna-1.0.24, but still don't have a function of transcode. So next minidlna-1.0.24 may be better to use :)
_ minidlna_1.0.24 with transcode patch
I had to do DIRTY HACK to build minidlna-1.0.24 B)
- tar xvzf minidlna_1.0.24_src.tar.gz
- cd minidlna-1.0.24
- tar xOvzf ../minidlna_transcode_1.0.24-5.tar.gz minidlna_1.0.24_transcode.patch | patch -p1
- patch -p1 <minidlna-1.0.24-dirtyhack.diff
# # minidlna-1.0.24-dirtyhack.diff # diff -crN minidlna-1.0.24.ORG/Makefile minidlna-1.0.24/Makefile *** minidlna-1.0.24.ORG/Makefile 2012-07-21 19:27:34.010000085 +0900 --- minidlna-1.0.24/Makefile 2012-07-21 19:28:11.943000085 +0900 *************** *** 24,29 **** --- 24,30 ---- #CFLAGS = -Wall -g -Os -D_GNU_SOURCE CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ -I/usr/include/ffmpeg \ + -I/usr/local/include/libavutil -I/usr/local/include/libavcodec -I/usr/local/include/libavformat \ -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \ -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat #STATIC_LINKING: CFLAGS += -DSTATIC *************** *** 59,65 **** ALLOBJS = $(BASEOBJS) $(LNXOBJS) ifeq (,$(findstring CYGWIN,$(OS_NAME))) ! LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis #STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm else LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis --- 60,66 ---- ALLOBJS = $(BASEOBJS) $(LNXOBJS) ifeq (,$(findstring CYGWIN,$(OS_NAME))) ! LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lavutil -lavcodec -lid3tag -lFLAC -logg -lvorbis -ldl -lbz2 -lavutil #STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm else LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis *************** *** 103,109 **** $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR) ifeq (,$(findstring CYGWIN,$(OS_NAME))) ! minidlna: $(BASEOBJS) $(LNXOBJS) $(LIBS) else minidlna: $(BASEOBJS) $(LNXOBJS) endif --- 104,110 ---- $(INSTALL) --mode=0644 minidlna.conf $(ETCINSTALLDIR) ifeq (,$(findstring CYGWIN,$(OS_NAME))) ! minidlna: $(BASEOBJS) $(LNXOBJS) else minidlna: $(BASEOBJS) $(LNXOBJS) endif diff -crN minidlna-1.0.24.ORG/albumart.c minidlna-1.0.24/albumart.c *** minidlna-1.0.24.ORG/albumart.c 2012-02-11 08:37:22.000000000 +0900 --- minidlna-1.0.24/albumart.c 2012-07-21 19:28:11.944000085 +0900 *************** *** 20,25 **** --- 20,26 ---- #include <string.h> #include <unistd.h> #include <dirent.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <sys/param.h> #include <libgen.h> diff -crN minidlna-1.0.24.ORG/daemonize.c minidlna-1.0.24/daemonize.c *** minidlna-1.0.24.ORG/daemonize.c 2012-07-21 19:27:34.011000085 +0900 --- minidlna-1.0.24/daemonize.c 2012-07-21 19:33:12.132000117 +0900 *************** *** 27,32 **** --- 27,33 ---- * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/types.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> diff -crN minidlna-1.0.24.ORG/dirtyhack.h minidlna-1.0.24/dirtyhack.h *** minidlna-1.0.24.ORG/dirtyhack.h 1970-01-01 09:00:00.000000000 +0900 --- minidlna-1.0.24/dirtyhack.h 2012-07-21 19:39:44.947000091 +0900 *************** *** 0 **** --- 1,34 ---- + typedef __time_t time_t; + struct timespec + { + __time_t tv_sec; /* Seconds. */ + long int tv_nsec; /* Nanoseconds. */ + }; + #define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO + #define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO + #define AV_PKT_FLAG_KEY PKT_FLAG_KEY + struct tm + { + int tm_sec; /* Seconds. [0-60] (1 leap second) */ + int tm_min; /* Minutes. [0-59] */ + int tm_hour; /* Hours. [0-23] */ + int tm_mday; /* Day. [1-31] */ + int tm_mon; /* Month. [0-11] */ + int tm_year; /* Year - 1900. */ + int tm_wday; /* Day of week. [0-6] */ + int tm_yday; /* Days in year.[0-365] */ + int tm_isdst; /* DST. [-1/0/1]*/ + + #ifdef __USE_BSD + long int tm_gmtoff; /* Seconds east of UTC. */ + __const char *tm_zone; /* Timezone abbreviation. */ + #else + long int __tm_gmtoff; /* Seconds east of UTC. */ + __const char *__tm_zone; /* Timezone abbreviation. */ + #endif + }; + #define AVMetadataTag AVDictionaryEntry + #define AV_METADATA_IGNORE_SUFFIX AV_DICT_IGNORE_SUFFIX + #define av_metadata_get av_dict_get + #define CLOCK_MONOTONIC 1 + #define CLOCK_REALTIME 0 diff -crN minidlna-1.0.24.ORG/inotify.c minidlna-1.0.24/inotify.c *** minidlna-1.0.24.ORG/inotify.c 2012-07-21 19:27:34.020000085 +0900 --- minidlna-1.0.24/inotify.c 2012-07-21 19:28:11.952000085 +0900 *************** *** 25,30 **** --- 25,31 ---- #include <libgen.h> #include <errno.h> #include <sys/types.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <sys/time.h> #include <sys/resource.h> diff -crN minidlna-1.0.24.ORG/log.c minidlna-1.0.24/log.c *** minidlna-1.0.24.ORG/log.c 2012-02-15 03:26:53.000000000 +0900 --- minidlna-1.0.24/log.c 2012-07-21 19:28:11.953000085 +0900 *************** *** 22,27 **** --- 22,28 ---- #include <stdio.h> #include <stdarg.h> #include <string.h> + #include "dirtyhack.h" #include <time.h> #include "log.h" diff -crN minidlna-1.0.24.ORG/metadata.c minidlna-1.0.24/metadata.c *** minidlna-1.0.24.ORG/metadata.c 2012-07-21 19:27:34.028000085 +0900 --- minidlna-1.0.24/metadata.c 2012-07-21 19:28:11.956000085 +0900 *************** *** 19,24 **** --- 19,25 ---- #include <ctype.h> #include <string.h> #include <stdlib.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <unistd.h> diff -crN minidlna-1.0.24.ORG/minidlna.c minidlna-1.0.24/minidlna.c *** minidlna-1.0.24.ORG/minidlna.c 2012-07-21 19:27:34.035000085 +0900 --- minidlna-1.0.24/minidlna.c 2012-07-21 19:29:08.188000085 +0900 *************** *** 55,60 **** --- 55,61 ---- #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> + #include "dirtyhack.h" #include <fcntl.h> #include <sys/file.h> #include <sys/time.h> diff -crN minidlna-1.0.24.ORG/minissdp.c minidlna-1.0.24/minissdp.c *** minidlna-1.0.24.ORG/minissdp.c 2012-02-15 03:26:53.000000000 +0900 --- minidlna-1.0.24/minissdp.c 2012-07-21 19:35:08.004000087 +0900 *************** *** 39,44 **** --- 39,45 ---- #include <netinet/in.h> #include <arpa/inet.h> #include <errno.h> + #include "dirtyhack.h" #include "config.h" #include "upnpdescstrings.h" diff -crN minidlna-1.0.24.ORG/options.c minidlna-1.0.24/options.c *** minidlna-1.0.24.ORG/options.c 2012-07-21 19:27:34.037000085 +0900 --- minidlna-1.0.24/options.c 2012-07-21 19:34:41.570000288 +0900 *************** *** 31,36 **** --- 31,37 ---- #include <string.h> #include <stdlib.h> #include <ctype.h> + #include "dirtyhack.h" #include "options.h" #include "upnpglobalvars.h" diff -crN minidlna-1.0.24.ORG/playlist.c minidlna-1.0.24/playlist.c *** minidlna-1.0.24.ORG/playlist.c 2012-02-11 08:37:22.000000000 +0900 --- minidlna-1.0.24/playlist.c 2012-07-21 19:28:11.959000085 +0900 *************** *** 18,23 **** --- 18,24 ---- #include <stdio.h> #include <string.h> #include <stdlib.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <libgen.h> #include <limits.h> diff -crN minidlna-1.0.24.ORG/scanner.c minidlna-1.0.24/scanner.c *** minidlna-1.0.24.ORG/scanner.c 2012-01-22 09:28:03.000000000 +0900 --- minidlna-1.0.24/scanner.c 2012-07-21 19:28:11.962000085 +0900 *************** *** 23,28 **** --- 23,29 ---- #include <locale.h> #include <libgen.h> #include <inttypes.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <sys/time.h> #include <sys/resource.h> diff -crN minidlna-1.0.24.ORG/sql.c minidlna-1.0.24/sql.c *** minidlna-1.0.24.ORG/sql.c 2012-02-15 03:44:56.000000000 +0900 --- minidlna-1.0.24/sql.c 2012-07-21 19:41:50.384000068 +0900 *************** *** 18,23 **** --- 18,24 ---- #include <stdio.h> #include <string.h> #include <unistd.h> + #include "dirtyhack.h" #include "sql.h" #include "upnpglobalvars.h" diff -crN minidlna-1.0.24.ORG/tagutils/tagutils.c minidlna-1.0.24/tagutils/tagutils.c *** minidlna-1.0.24.ORG/tagutils/tagutils.c 2010-11-12 08:48:14.000000000 +0900 --- minidlna-1.0.24/tagutils/tagutils.c 2012-07-21 19:28:11.966000085 +0900 *************** *** 27,32 **** --- 27,33 ---- #include <stdlib.h> #include <stddef.h> #include <string.h> + #include "../dirtyhack.h" #include <fcntl.h> #include <unistd.h> #include <time.h> diff -crN minidlna-1.0.24.ORG/upnpdescgen.c minidlna-1.0.24/upnpdescgen.c *** minidlna-1.0.24.ORG/upnpdescgen.c 2012-01-21 09:34:13.000000000 +0900 --- minidlna-1.0.24/upnpdescgen.c 2012-07-21 19:32:07.045000104 +0900 *************** *** 29,34 **** --- 29,35 ---- #include <stdio.h> #include <stdlib.h> #include <string.h> + #include "dirtyhack.h" #include "config.h" #include "getifaddr.h" diff -crN minidlna-1.0.24.ORG/upnpevents.c minidlna-1.0.24/upnpevents.c *** minidlna-1.0.24.ORG/upnpevents.c 2012-02-14 07:48:56.000000000 +0900 --- minidlna-1.0.24/upnpevents.c 2012-07-21 19:41:01.487000033 +0900 *************** *** 57,62 **** --- 57,63 ---- #include <sys/param.h> #include <netinet/in.h> #include <arpa/inet.h> + #include "dirtyhack.h" #include <fcntl.h> #include <errno.h> diff -crN minidlna-1.0.24.ORG/upnpglobalvars.c minidlna-1.0.24/upnpglobalvars.c *** minidlna-1.0.24.ORG/upnpglobalvars.c 2012-07-21 19:27:34.039000085 +0900 --- minidlna-1.0.24/upnpglobalvars.c 2012-07-21 19:34:13.688999997 +0900 *************** *** 53,58 **** --- 53,59 ---- #else #include <limits.h> #endif // __CYGWIN__ + #include "dirtyhack.h" #include "config.h" #include "upnpglobalvars.h" diff -crN minidlna-1.0.24.ORG/upnphttp.c minidlna-1.0.24/upnphttp.c *** minidlna-1.0.24.ORG/upnphttp.c 2012-07-21 19:27:34.048000085 +0900 --- minidlna-1.0.24/upnphttp.c 2012-07-21 19:30:12.005000081 +0900 *************** *** 55,60 **** --- 55,61 ---- #include <sys/param.h> #include <ctype.h> #include <sys/types.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <fcntl.h> #include <errno.h> diff -crN minidlna-1.0.24.ORG/upnpsoap.c minidlna-1.0.24/upnpsoap.c *** minidlna-1.0.24.ORG/upnpsoap.c 2012-07-21 19:27:34.059000085 +0900 --- minidlna-1.0.24/upnpsoap.c 2012-07-21 19:32:38.711999967 +0900 *************** *** 52,57 **** --- 52,58 ---- #include <sys/socket.h> #include <unistd.h> #include <dirent.h> + #include "dirtyhack.h" #include <sys/stat.h> #include <sys/types.h> #include <arpa/inet.h> diff -crN minidlna-1.0.24.ORG/utils.c minidlna-1.0.24/utils.c *** minidlna-1.0.24.ORG/utils.c 2012-07-21 19:27:34.060000085 +0900 --- minidlna-1.0.24/utils.c 2012-07-21 19:43:05.541000085 +0900 *************** *** 24,29 **** --- 24,30 ---- #else #include <limits.h> #endif // __CYGWIN__ + #include "dirtyhack.h" #include <sys/stat.h> #include <unistd.h> #include <sys/types.h> diff -crN minidlna-1.0.24.ORG/uuid.c minidlna-1.0.24/uuid.c *** minidlna-1.0.24.ORG/uuid.c 2012-07-21 19:27:34.068000085 +0900 --- minidlna-1.0.24/uuid.c 2012-07-21 19:35:38.580000160 +0900 *************** *** 26,31 **** --- 26,32 ---- #include <stdio.h> #include <stdlib.h> #include <time.h> + #include "dirtyhack.h" #include <fcntl.h> #include <unistd.h> #include "config.h"
- make
- make install install-conf
[ツッコミを入れる]