Index: head/graphics/amide/Makefile =================================================================== --- head/graphics/amide/Makefile (revision 430413) +++ head/graphics/amide/Makefile (revision 430414) @@ -1,60 +1,59 @@ # $FreeBSD$ PORTNAME= amide PORTVERSION= 1.0.5 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= graphics MASTER_SITES= SF MAINTAINER= madpilot@FreeBSD.org COMMENT= Medical Imaging Data Examiner LICENSE= GPLv2 BUILD_DEPENDS= gm4:devel/m4 GNU_CONFIGURE= yes USE_CSTD= gnu89 MAKE_JOBS_UNSAFE= yes USES= gettext gmake pkgconfig tar:tgz USE_GNOME= gtk20 intltool libgnomecanvas libgnomeui libxml2 gnomedocutils INSTALLS_OMF= yes OPTIONS_DEFINE= CODEC DCMTK GSL NLS VOLPACK XMEDCON OPTIONS_SINGLE= CODEC OPTIONS_SINGLE_CODEC= FFMPEG FAME OPTIONS_DEFAULT= CODEC DCMTK FFMPEG GSL VOLPACK XMEDCON CODEC_DESC= Enable codec support. Choose one of FAME or FFMPEG DCMTK_DESC= Use dcmtk FAME_DESC= Use libfame FFMPEG_DESC= Use ffmpeg GSL_DESC= Use gsl VOLPACK_DESC= Use volpack XMEDCON_DESC= Use xmedcon OPTIONS_SUB= yes -DCMTK_CONFIGURE_ENABLE= libdcmdata +DCMTK_CONFIGURE_ON= --enable-libdcmdata +DCMTK_CONFIGURE_OFF= --enable-libdcmdata=no DCMTK_LIB_DEPENDS= libdcmdata.so:devel/dcmtk FAME_CONFIGURE_ENABLE= libfame FAME_LIB_DEPENDS= libfame.so:multimedia/libfame FFMPEG_CONFIGURE_ENABLE= ffmpeg -FFMPEG_LIB_DEPENDS= libavcodec0.so:multimedia/ffmpeg0 +FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg GSL_CONFIGURE_ENABLE= libgsl GSL_LIB_DEPENDS= libgsl.so:math/gsl VOLPACK_CONFIGURE_ENABLE= libvolpack VOLPACK_BUILD_DEPENDS= ${LOCALBASE}/lib/libvolpack.a:graphics/volpack XMEDCON_CONFIGURE_ENABLE= libmdc XMEDCON_LIB_DEPENDS= libmdc.so:graphics/xmedcon NLS_CONFIGURE_ENABLE= nls post-patch: @${TOUCH} ${WRKSRC}/aclocal.m4 ${WRKSRC}/Makefile.in \ ${WRKSRC}/amide_config.h.in @${REINPLACE_CMD} \ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ - -e 's|libavcodec|libavcodec0|g' \ - -e 's|libavutil|libavutil0|g' \ ${WRKSRC}/configure .include Index: head/graphics/amide/files/patch-Makefile.in =================================================================== --- head/graphics/amide/files/patch-Makefile.in (revision 430413) +++ head/graphics/amide/files/patch-Makefile.in (revision 430414) @@ -1,12 +1,12 @@ ---- Makefile.in.orig 2014-01-25 23:25:32.000000000 +0100 -+++ Makefile.in 2014-01-27 13:14:16.876831395 +0100 -@@ -89,8 +89,7 @@ +--- Makefile.in.orig 2014-01-27 03:04:32 UTC ++++ Makefile.in +@@ -89,8 +89,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/g $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs Index: head/graphics/amide/files/patch-configure =================================================================== --- head/graphics/amide/files/patch-configure (revision 430413) +++ head/graphics/amide/files/patch-configure (revision 430414) @@ -1,62 +1,71 @@ ---- configure.orig 2014-01-27 04:04:34.000000000 +0100 -+++ configure 2014-01-29 13:12:46.268622841 +0100 -@@ -16216,7 +16216,7 @@ +--- configure.orig 2014-01-27 03:04:34 UTC ++++ configure +@@ -16216,7 +16216,7 @@ if test "x$ac_cv_func_bind_textdomain_co DATADIRNAME=share else CATOBJEXT=.mo - DATADIRNAME=lib + DATADIRNAME=share fi ;; -@@ -16226,7 +16226,7 @@ +@@ -16226,7 +16226,7 @@ fi ;; *) CATOBJEXT=.mo - DATADIRNAME=lib + DATADIRNAME=share ;; esac fi -@@ -16914,12 +16914,12 @@ +@@ -16914,12 +16914,12 @@ else if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : DATADIRNAME=share else - DATADIRNAME=lib + DATADIRNAME=share fi ;; *) - DATADIRNAME=lib + DATADIRNAME=share ;; esac fi -@@ -17612,8 +17612,8 @@ +@@ -17612,8 +17612,8 @@ else THREAD_LIBS="" fi -AMIDE_LIBDCMDATA_LIBS="-L/usr/local/dicom/lib -L/usr/lib64/dcmtk -L/usr/lib/dcmtk -ldcmdata -loflog -lofstd -lz $THREAD_LIBS" -AMIDE_LIBDCMDATA_CFLAGS="-I/usr/local/dicom/include" +AMIDE_LIBDCMDATA_LIBS="-L%%LOCALBASE%%/lib -ldcmdata -loflog -lofstd -lz $THREAD_LIBS" +AMIDE_LIBDCMDATA_CFLAGS="-I%%LOCALBASE%%/include" saved_libs="${LIBS}" LIBS="${LIBS} ${AMIDE_LIBDCMDATA_LIBS}" saved_cxxflags="${CXXFLAGS}" -@@ -18154,6 +18154,7 @@ +@@ -17643,6 +17643,8 @@ if ac_fn_cxx_try_link "$LINENO"; then : + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdcmdata was not found." >&5 + $as_echo "$as_me: WARNING: libdcmdata was not found." >&2;} ++ AMIDE_LIBDCMDATA_LIBS="" ++ AMIDE_LIBDCMDATA_CFLAGS="" + fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +@@ -18154,6 +18156,7 @@ $as_echo_n "checking for libfame - versi ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $LIBFAME_CFLAGS" + CXXFLAGS="$CFLAGS $LIBFAME_CFLAGS" LIBS="$LIBFAME_LIBS $LIBS" rm -f conf.libfametest if test "$cross_compiling" = yes; then : -@@ -18165,6 +18166,7 @@ +@@ -18165,6 +18168,7 @@ else #include #include #include +#include int main () Index: head/graphics/amide/files/patch-src-alignment_mutual_information.c =================================================================== --- head/graphics/amide/files/patch-src-alignment_mutual_information.c (revision 430413) +++ head/graphics/amide/files/patch-src-alignment_mutual_information.c (revision 430414) @@ -1,25 +1,25 @@ ---- src/alignment_mutual_information.c.orig 2012-01-22 17:25:06.000000000 +0100 -+++ src/alignment_mutual_information.c 2013-08-28 10:30:30.265534615 +0200 +--- src/alignment_mutual_information.c.orig 2012-01-22 16:25:06 UTC ++++ src/alignment_mutual_information.c @@ -28,6 +28,13 @@ #include "amitk_data_set_DOUBLE_0D_SCALING.h" #include "alignment_mutual_information.h" +#if __FreeBSD__ >= 2 +#include +#if __FreeBSD_version <= 802502 +#define log2(x) (log(x) / M_LN2) +#endif +#endif + /* this algorithm will calculate the amount of mutual information between two data sets in their current orientations */ /* it is a re-write of the original algorithm for purposes of improved speed. the hope is that it won't affect accuracy. */ /* rather than computing mutual information for the whole volume of data, the algorithm computes it for three orthogonal */ -@@ -209,7 +216,7 @@ +@@ -209,7 +216,7 @@ gdouble calculate_mutual_information(Ami //g_print("\t\%i", mutual_information_array[i][j] ); // for point-wise counts // g_print("\t\%4.3f", incremental_mi ); // for point-wise probability - if isinf(incremental_mi) { + if(isinf(incremental_mi)) { //count it (because lots and lots of zeroes mean bad registration) and go to the next loop mi_nan_count++; // this is most often a problem when the incemental MI is infinity, due to divide by zero Index: head/graphics/amide/files/patch-src_mpeg__encode.c =================================================================== --- head/graphics/amide/files/patch-src_mpeg__encode.c (nonexistent) +++ head/graphics/amide/files/patch-src_mpeg__encode.c (revision 430414) @@ -0,0 +1,77 @@ +--- src/mpeg_encode.c.orig 2014-01-23 20:13:52 UTC ++++ src/mpeg_encode.c +@@ -143,6 +143,7 @@ static void convert_rgb_pixbuf_to_yuv(yu + + #include + ++#include + + typedef struct { + AVCodec *codec; +@@ -234,11 +235,11 @@ gpointer mpeg_encode_setup(gchar * outpu + + switch(type) { + case ENCODE_MPEG4: +- codec_type = CODEC_ID_MPEG4; ++ codec_type = AV_CODEC_ID_MPEG4; + break; + case ENCODE_MPEG1: + default: +- codec_type=CODEC_ID_MPEG1VIDEO; ++ codec_type=AV_CODEC_ID_MPEG1VIDEO; + break; + } + +@@ -268,7 +269,7 @@ gpointer mpeg_encode_setup(gchar * outpu + return NULL; + } + +- encode->picture= avcodec_alloc_frame(); ++ encode->picture= av_frame_alloc(); + if (!encode->picture) { + g_warning("couldn't allocate memory for encode->picture"); + encode_free(encode); +@@ -293,7 +294,7 @@ gpointer mpeg_encode_setup(gchar * outpu + encode->context->time_base= (AVRational){1,FRAMES_PER_SECOND}; + encode->context->gop_size = 10; /* emit one intra frame every ten frames */ + encode->context->max_b_frames=10; +- encode->context->pix_fmt = PIX_FMT_YUV420P; ++ encode->context->pix_fmt = AV_PIX_FMT_YUV420P; + + /* encoding parameters */ + encode->context->sample_aspect_ratio= (AVRational){1,1}; /* our pixels are square */ +@@ -355,6 +356,10 @@ gpointer mpeg_encode_setup(gchar * outpu + encode->picture->linesize[1] = encode->context->width/2; + encode->picture->linesize[2] = encode->context->width/2; + ++ encode->picture->width = xsize; ++ encode->picture->height = ysize; ++ encode->picture->format = AV_PIX_FMT_YUV420P; ++ + return (gpointer) encode; + } + +@@ -362,12 +367,21 @@ gpointer mpeg_encode_setup(gchar * outpu + gboolean mpeg_encode_frame(gpointer data, GdkPixbuf * pixbuf) { + encode_t * encode = data; + gint out_size; ++ AVPacket packet = { 0 }; ++ int ret, got_output = 0; + + convert_rgb_pixbuf_to_yuv(encode->yuv, pixbuf); + + /* encode the image */ +- out_size = avcodec_encode_video(encode->context, encode->output_buffer, encode->output_buffer_size, encode->picture); +- fwrite(encode->output_buffer, 1, out_size, encode->output_file); ++ av_init_packet(&packet); ++ packet.data = encode->output_buffer; ++ packet.size = encode->output_buffer_size; ++ ret = avcodec_encode_video2(encode->context, &packet, ++ encode->picture, &got_output); ++ if (ret < 0) ++ return FALSE; ++ ++ fwrite(packet.data, 1, packet.size, encode->output_file); + + return TRUE; + }; Property changes on: head/graphics/amide/files/patch-src_mpeg__encode.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property