Skip to content

Commit

Permalink
[IMPROVEMENT]Modify Autoconf scripts to generate mac compatible tarba…
Browse files Browse the repository at this point in the history
…ll (#798)

* Modify Autoconf scripts to generate mac compatible tarball

* Update list of GSoC 2017 students
  • Loading branch information
techfreakworm authored and cfsmp3 committed Oct 19, 2017
1 parent a170f55 commit 4573f5e
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 17 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -116,3 +116,7 @@ package_creators/*.pkg.tar.xz
package_creators/*.rpm
src/lib_ccx/ccx.pc
windows/combase.pdb/
src/**/.deps
src/**/.dirstamp
mac/ccextractorGUI
linux/ccextractorGUI
2 changes: 2 additions & 0 deletions docs/CHANGES.TXT
Expand Up @@ -27,6 +27,8 @@
- Fix: Forcing -noru to cause deduplication in ISDB
- Fix: TS: Skip NULL packets
- Fix: When NAL decoding fails, don't dump the whole decoded thing, limit to 160 bytes.
- Fix: Modify Autoconf scripts to generate tarball for mac from `/package_creators/tarball.sh`
and include GUI files in tarball



Expand Down
1 change: 1 addition & 0 deletions docs/README.TXT
Expand Up @@ -38,6 +38,7 @@ Google Code-in 2016 students

Google Summer of Code 2017 students
- Diptanshu Jamgade
- Mayank Gupta

License
-------
Expand Down
23 changes: 20 additions & 3 deletions linux/Makefile.am
Expand Up @@ -269,15 +269,20 @@ ccextractor_SOURCES = \
../src/wrappers/wrapper.h


ccextractor_CFLAGS = -std=gnu99 -s -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT
ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT

ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi/ -I../src/lib_hash/ -I../src/protobuf-c/ -I../src/utf8proc/ -I../src/


ccextractor_LDADD=-lm

if SYS_IS_LINUX
ccextractor_CFLAGS += -O3 -DGPAC_CONFIG_LINUX
ccextractor_CFLAGS += -O3 -s -DGPAC_CONFIG_LINUX
endif

if SYS_IS_MAC
ccextractor_CFLAGS += -DPAC_CONFIG_DARWIN -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek
ccextractor_LDADD += -liconv -lz
endif

if HARDSUBX_IS_ENABLED
Expand Down Expand Up @@ -317,7 +322,7 @@ ccextractor_LDADD += $(TESS_LIB)
ccextractor_LDADD += $(LEPT_LIB)
endif

EXTRA_DIST = ../src/gpacmp4/gpac/sync_layer.h ../src/lib_ccx/ccfont2.xbm ../src/utf8proc/utf8proc_data.c
EXTRA_DIST = ../src/gpacmp4/gpac/sync_layer.h ../src/lib_ccx/ccfont2.xbm ../src/utf8proc/utf8proc_data.c fonts/ icon/

#For GUI
if BUILD_WITH_GUI
Expand All @@ -330,6 +335,7 @@ ccextractorGUI_SOURCES = \
../src/GUI/activity.h \
../src/GUI/terminal.c \
../src/GUI/preview.c \
../src/GUI/preview.h \
../src/GUI/ccx_cli_thread.c \
../src/GUI/ccx_cli_thread.h \
../src/GUI/command_builder.c \
Expand All @@ -354,15 +360,26 @@ ccextractorGUI_LDADD = ${glfw3_LIBS}

if SYS_IS_LINUX
ccextractorGUI_CFLAGS += -s -O3 -DUNIX
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
ccextractorGUI_LDADD += ${glew_LIBS}
ccextractorGUI_LDADD += -lX11 -lXinerama -lXcursor -lXi -lXrandr -lXxf86vm -lm -ldl -lpthread
endif

if SYS_IS_MAC
ccextractorGUI_CFLAGS += -O3 -DUNIX
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
ccextractorGUI_LDADD += ${glew_LIBS}
ccextractorGUI_LDFLAGS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
ccextractorGUI_LDADD += -lglfw -lm -L/usr/local/lib -lpthread
endif

if HARDSUBX_IS_ENABLED
if OCR_IS_ENABLED
ccextractorGUI_CFLAGS += -DENABLE_OCR
endif
endif

EXTRA_DIST += ../icon/ ../fonts/

endif

3 changes: 2 additions & 1 deletion linux/configure.ac
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([CCExtractor], [0.85], [carlos@ccextractor.org])
AC_INIT([CCExtractor], [0.86], [carlos@ccextractor.org])
AC_CONFIG_AUX_DIR([build-conf])
AC_CONFIG_SRCDIR([../src/ccextractor.c])
AM_INIT_AUTOMAKE([foreign subdir-objects])
Expand Down Expand Up @@ -113,6 +113,7 @@ AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ])
AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract` ])
AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ])
AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"])
AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"])
AM_CONDITIONAL(BUILD_WITH_GUI, [test "x$with_gui" = "xyes"])

AC_CONFIG_FILES([Makefile])
Expand Down
40 changes: 29 additions & 11 deletions mac/Makefile.am
Expand Up @@ -269,30 +269,33 @@ ccextractor_SOURCES = \
../src/wrappers/wrapper.h


ccextractor_CFLAGS = -std=gnu99 -s -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT
ccextractor_CFLAGS = -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT

ccextractor_CPPFLAGS =-I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi/ -I../src/lib_hash/ -I../src/protobuf-c/ -I../src/utf8proc/ -I../src/


ccextractor_LDADD=-lm

if SYS_IS_LINUX
ccextractor_CFLAGS += -O3 -s -DGPAC_CONFIG_LINUX
endif

if SYS_IS_MAC
ccextractor_CFLAGS += -DPAC_CONFIG_DARWIN -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek
ccextractor_LDADD += -liconv -lz
endif

if HARDSUBX_IS_ENABLED
ccextractor_CFLAGS += -DENABLE_HARDSUBX
AV_CPPFLAG= ${libavcodec_CFLAGS}
AV_CPPFLAG+= ${libavformat_CFLAGS}
AV_CPPFLAG+= ${libavutil_CFALGS}
AV_CPPFLAG+= ${libswscale_CFLAGS}
ccextractor_CPPFLAGS+= ${libavcodec_CFLAGS}
ccextractor_CPPFLAGS+= ${libavformat_CFLAGS}
ccextractor_CPPFLAGS+= ${libavutil_CFALGS}
ccextractor_CPPFLAGS+= ${libswscale_CFLAGS}
AV_LIB = ${libavcodec_LIBS}
AV_LIB += ${libavformat_LIBS}
AV_LIB += ${libavutil_LIBS}
AV_LIB += ${libswscale_LIBS}
ccextractor_LDADD += $(AV_LIB)
ccextractor_CPPFLAGS+=$(AV_CPPFLAG)
endif

if OCR_IS_ENABLED
Expand All @@ -308,8 +311,8 @@ else
#fix for raspberry pi not having a pkgconfig file for tesseract

if TESSERACT_PRESENT_RPI
ccextractor_LDADD += -ltesseract
ccextractor_CPPFLAGS += -I/usr/include/tesseract
TESS_LIB = -ltesseract
TESS_CPPFLAG = -I/usr/include/tesseract
endif
endif

Expand All @@ -319,7 +322,7 @@ ccextractor_LDADD += $(TESS_LIB)
ccextractor_LDADD += $(LEPT_LIB)
endif

EXTRA_DIST = ../src/gpacmp4/gpac/sync_layer.h ../src/lib_ccx/ccfont2.xbm ../src/utf8proc/utf8proc_data.c
EXTRA_DIST = ../src/gpacmp4/gpac/sync_layer.h ../src/lib_ccx/ccfont2.xbm ../src/utf8proc/utf8proc_data.c fonts/ icon/

#For GUI
if BUILD_WITH_GUI
Expand All @@ -332,6 +335,7 @@ ccextractorGUI_SOURCES = \
../src/GUI/activity.h \
../src/GUI/terminal.c \
../src/GUI/preview.c \
../src/GUI/preview.h \
../src/GUI/ccx_cli_thread.c \
../src/GUI/ccx_cli_thread.h \
../src/GUI/command_builder.c \
Expand All @@ -350,12 +354,23 @@ ccextractorGUI_SOURCES = \

ccextractorGUI_CFLAGS = -std=gnu99


ccextractorGUI_LDADD = ${glfw3_LIBS}


if SYS_IS_LINUX
ccextractorGUI_CFLAGS += -s -O3 -DUNIX
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
ccextractorGUI_LDADD += ${glew_LIBS}
ccextractorGUI_LDADD += -lX11 -lXinerama -lXcursor -lXi -lXrandr -lXxf86vm -lm -ldl -lpthread
endif

if SYS_IS_MAC
ccextractorGUI_CFLAGS += -O3 -DUNIX
ccextractorgui_LDFLAGS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
ccextractorgui_LDADD += -lglfw -lm -L/usr/local/lib -lpthread
ccextractorGUI_CFLAGS += ${glew_CFLAGS}
ccextractorGUI_LDADD += ${glew_LIBS}
ccextractorGUI_LDFLAGS = -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
ccextractorGUI_LDADD += -lm -L/usr/local/lib -lpthread
endif

if HARDSUBX_IS_ENABLED
Expand All @@ -364,4 +379,7 @@ ccextractorGUI_CFLAGS += -DENABLE_OCR
endif
endif

EXTRA_DIST += ../icon/ ../fonts/

endif

5 changes: 3 additions & 2 deletions mac/configure.ac
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([CCExtractor], [0.85], [carlos@ccextractor.org])
AC_INIT([CCExtractor], [0.86], [carlos@ccextractor.org])
AC_CONFIG_AUX_DIR([build-conf])
AC_CONFIG_SRCDIR([../src/ccextractor.c])
AM_INIT_AUTOMAKE([foreign subdir-objects])
Expand Down Expand Up @@ -88,7 +88,7 @@ esac],[ffmpeg=false])

AC_ARG_WITH([gui],
AC_HELP_STRING([--with-gui], [Builds CCExtractor with GUI (requires GLFW and GLEW)]),
[PKG_CHECK_MODULES([glfw3], [glfw3])],
[PKG_CHECK_MODULES([glfw3], [glfw3]) && PKG_CHECK_MODULES([glew], [glew])],
[with_gui=no])


Expand All @@ -112,6 +112,7 @@ AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ]
AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ])
AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract`])
AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ])
AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"])
AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"])
AM_CONDITIONAL(BUILD_WITH_GUI, [test "x$with_gui" = "xyes"])

Expand Down

0 comments on commit 4573f5e

Please sign in to comment.