Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
31e1756c
Commit
31e1756c
authored
Jan 29, 2017
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: use Makefile conditional to disable code
This fixes the build without gcrypt.
parent
32427fa4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
66 deletions
+58
-66
configure.ac
configure.ac
+1
-3
include/vlc_update.h
include/vlc_update.h
+0
-4
modules/gui/qt/Makefile.am
modules/gui/qt/Makefile.am
+4
-0
src/Makefile.am
src/Makefile.am
+9
-3
src/misc/update.c
src/misc/update.c
+0
-39
src/misc/update_crypto.c
src/misc/update_crypto.c
+0
-4
src/missing.c
src/missing.c
+40
-0
test/Makefile.am
test/Makefile.am
+4
-3
test/src/crypto/update.c
test/src/crypto/update.c
+0
-10
No files found.
configure.ac
View file @
31e1756c
...
...
@@ -4107,10 +4107,8 @@ if test "${enable_update_check}" = "yes"
then
AS_IF([test "${ac_cv_lib_gcrypt}" != "yes"],[
AC_MSG_ERROR([libgcrypt is required for update checking system]) ])
VLC_ADD_LIBS([libvlccore], [${GCRYPT_LIBS}])
VLC_ADD_CFLAGS([libvlccore], [${GCRYPT_CFLAGS}])
AC_DEFINE([UPDATE_CHECK], 1, [Define if you want to use the VLC update mechanism])
fi
AM_CONDITIONAL(UPDATE_CHECK, [test "${enable_update_check}" = "yes"])
dnl
dnl OS X notification plugin
...
...
include/vlc_update.h
View file @
31e1756c
...
...
@@ -34,8 +34,6 @@
*VLC software update interface
*/
#ifdef UPDATE_CHECK
/**
* Describes an update VLC release number
*/
...
...
@@ -49,8 +47,6 @@ struct update_release_t
char
*
psz_desc
;
///< Release description
};
#endif
/* UPDATE_CHECK */
typedef
struct
update_release_t
update_release_t
;
VLC_API
update_t
*
update_New
(
vlc_object_t
*
);
...
...
modules/gui/qt/Makefile.am
View file @
31e1756c
...
...
@@ -14,6 +14,7 @@ guidir = $(pluginsdir)/gui
SUFFIXES
+=
.ui .h .hpp .moc.cpp
libqt_plugin_la_CPPFLAGS
=
$(AM_CPPFLAGS)
libqt_plugin_la_CXXFLAGS
=
$(AM_CXXFLAGS)
$(QT_CFLAGS)
$(CXXFLAGS_qt)
libqt_plugin_la_LIBADD
=
$(QT_LIBS)
$(LIBS_qt)
$(LIBM)
libqt_plugin_la_LDFLAGS
=
$(AM_LDFLAGS)
-rpath
'
$(guidir)
'
...
...
@@ -31,6 +32,9 @@ endif
if
HAVE_WIN32
libqt_plugin_la_LIBADD
+=
$(LIBCOM)
-lcomctl32
-luuid
endif
if
UPDATE_CHECK
libqt_plugin_la_CPPFLAGS
+=
-DUPDATE_CHECK
endif
gui_LTLIBRARIES
=
$(LTLIBqt)
EXTRA_LTLIBRARIES
=
libqt_plugin.la
...
...
src/Makefile.am
View file @
31e1756c
...
...
@@ -339,9 +339,6 @@ libvlccore_la_SOURCES = \
misc/variables.h
\
misc/variables.c
\
misc/error.c
\
misc/update.h
\
misc/update.c
\
misc/update_crypto.c
\
misc/xml.c
\
misc/addons.c
\
misc/filter.c
\
...
...
@@ -442,6 +439,15 @@ libvlccore_la_SOURCES += input/vlm.c input/vlm_event.c input/vlmshell.c
endif
endif
if
UPDATE_CHECK
libvlccore_la_SOURCES
+=
\
misc/update.h misc/update.c
\
misc/update_crypto.c
AM_CPPFLAGS
+=
-DUPDATE_CHECK
AM_CFLAGS
+=
$(GCRYPT_CFLAGS)
libvlccore_la_LIBADD
+=
$(GCRYPT_LIBS)
endif
libvlccore_la_LDFLAGS
=
\
$(LDFLAGS_libvlccore)
\
-no-undefined
\
...
...
src/misc/update.c
View file @
31e1756c
...
...
@@ -39,8 +39,6 @@
#include <vlc_common.h>
#include <vlc_update.h>
#ifdef UPDATE_CHECK
#include <assert.h>
#include <vlc_pgpkey.h>
...
...
@@ -757,40 +755,3 @@ update_release_t *update_GetRelease( update_t *p_update )
{
return
&
p_update
->
release
;
}
#else
#undef update_New
update_t
*
update_New
(
vlc_object_t
*
p_this
)
{
(
void
)
p_this
;
return
NULL
;
}
void
update_Delete
(
update_t
*
p_update
)
{
(
void
)
p_update
;
}
void
update_Check
(
update_t
*
p_update
,
void
(
*
pf_callback
)(
void
*
,
bool
),
void
*
p_data
)
{
(
void
)
p_update
;
(
void
)
pf_callback
;
(
void
)
p_data
;
}
bool
update_NeedUpgrade
(
update_t
*
p_update
)
{
(
void
)
p_update
;
return
false
;
}
void
update_Download
(
update_t
*
p_update
,
const
char
*
psz_destdir
)
{
(
void
)
p_update
;
(
void
)
psz_destdir
;
}
update_release_t
*
update_GetRelease
(
update_t
*
p_update
)
{
(
void
)
p_update
;
return
NULL
;
}
#endif
src/misc/update_crypto.c
View file @
31e1756c
...
...
@@ -34,8 +34,6 @@
# include "config.h"
#endif
#ifdef UPDATE_CHECK
#include <gcrypt.h>
#include <assert.h>
#include <limits.h>
...
...
@@ -1106,5 +1104,3 @@ int download_signature( vlc_object_t *p_this, signature_packet_t *p_sig,
return
VLC_SUCCESS
;
}
#endif
/* UPDATE_CHECK */
src/missing.c
View file @
31e1756c
...
...
@@ -402,3 +402,43 @@ vlm_t *vlm_New (vlc_object_t *obj)
return
NULL
;
}
#endif
/* !ENABLE_VLM */
#ifndef UPDATE_CHECK
# include <vlc_update.h>
update_t
*
(
update_New
)(
vlc_object_t
*
obj
)
{
(
void
)
obj
;
return
NULL
;
}
void
update_Delete
(
update_t
*
u
)
{
(
void
)
u
;
vlc_assert_unreachable
();
}
void
update_Check
(
update_t
*
u
,
void
(
*
cb
)(
void
*
,
bool
),
void
*
opaque
)
{
(
void
)
u
;
(
void
)
cb
;
(
void
)
opaque
;
vlc_assert_unreachable
();
}
bool
update_NeedUpgrade
(
update_t
*
u
)
{
(
void
)
u
;
vlc_assert_unreachable
();
}
void
update_Download
(
update_t
*
u
,
const
char
*
dir
)
{
(
void
)
u
;
(
void
)
dir
;
vlc_assert_unreachable
();
}
update_release_t
*
update_GetRelease
(
update_t
*
u
)
{
(
void
)
u
;
vlc_assert_unreachable
();
}
#endif
/* !UPDATE_CHECK */
test/Makefile.am
View file @
31e1756c
...
...
@@ -23,7 +23,6 @@ check_PROGRAMS = \
test_libvlc_slaves
\
test_src_config_chain
\
test_src_misc_variables
\
test_src_crypto_update
\
test_src_input_stream
\
test_src_input_stream_fifo
\
test_src_interface_dialog
\
...
...
@@ -32,8 +31,10 @@ check_PROGRAMS = \
test_src_misc_keystore
\
test_modules_packetizer_hxxx
\
test_modules_keystore
\
test_modules_tls
\
$(NULL)
test_modules_tls
if
UPDATE_CHECK
check_PROGRAMS
+=
test_src_crypto_update
endif
check_SCRIPTS
=
\
modules/lua/telnet.sh
\
...
...
test/src/crypto/update.c
View file @
31e1756c
...
...
@@ -24,15 +24,6 @@
#include <stdio.h>
#ifndef UPDATE_CHECK
int
main
(
void
)
{
fprintf
(
stderr
,
"Update checking disabled, not testing.
\n
"
);
return
77
;
}
#else
#include <vlc_common.h>
#include "../src/misc/update_crypto.c"
...
...
@@ -292,4 +283,3 @@ int main(void)
check
(
&
key
,
&
key2
,
status
,
&
sig
,
key_longid
,
key_longid2
);
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment