Skip to content

Commit 9dc22cf

Browse files
committed
Updates to build.gradle and Github actions to support change to ubuntu 22.04
1 parent f8c76d6 commit 9dc22cf

File tree

6 files changed

+49
-20
lines changed

6 files changed

+49
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
jobs:
1010
build:
1111

12-
# runs-on: ubuntu-latest
13-
runs-on: ubuntu-18.04
12+
# runs-on: ubuntu-latest 2025-03-04 changed to 22.04 as 20.04 is no longer supported as of 4/1/2025
13+
runs-on: ubuntu-22.04
1414

1515
steps:
1616
- uses: actions/checkout@v2

build.gradle

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ext {
4848
version = fullVersion
4949

5050
// Just printing out the SAGETV build version for informational purposes
51-
// System.out.println("SAGETV VERSION ${versionArch}");
51+
//System.out.println("SAGETV VERSION ${versionArch}");
5252

5353
// set gradle's buildDir to something other than the default 'build', or
5454
// we'll end up deleting EVERYTHING in 'build' when we ./gradlew clean
@@ -322,19 +322,22 @@ def getBuildNumber() {
322322

323323
if (OperatingSystem.current().isLinux()) {
324324
// use git to find the build version
325-
ant.exec(
326-
command: 'git rev-list HEAD --count',
327-
os: 'Linux',
328-
failonerror: true,
329-
outputproperty: 'sagebuildnum')
330-
331-
buildVer = ant.sagebuildnum
325+
// 03-06-2025 jusjoken: Also we should note that you will get error code 128 if you have git
326+
// installed, but you did not pull this project using git because git will not know where
327+
// to get the commit count from.
328+
new ByteArrayOutputStream().withStream { outputStream ->
329+
exec {
330+
executable 'git'
331+
args 'rev-list', 'HEAD', '--count'
332+
standardOutput = outputStream
333+
}
334+
buildVer = outputStream.toString().trim()
335+
}
332336
} else if (OperatingSystem.current().isWindows()) {
333337
//ensure full path to git\bin is in the Path Environment variable on windows
334338
// 04-24-2017 JS: I changed this to remove the dependency on sh. Also we should note that
335339
// you will get error code 128 if you have git installed, but you did not pull this project
336-
// using git because git will not know where to get the commit count from. This is likely
337-
// true for Linux too.
340+
// using git because git will not know where to get the commit count from.
338341
new ByteArrayOutputStream().withStream { outputStream ->
339342
exec {
340343
executable 'git'
@@ -381,7 +384,7 @@ task(updateBuildNumber) {
381384
// save buildnumber to file
382385
// we'll be referencing it later
383386
// Eventually we'll do this, but for now, fetch it every time
384-
// new File('.buildnumber').write(buildVersion)
387+
new File('.buildnumber').write(buildVersion)
385388
}
386389
}
387390

@@ -406,7 +409,7 @@ compileJava.dependsOn updateBuildNumber
406409
sageJar.dependsOn cleanSageJar, classes, test
407410
miniclientJar.dependsOn clean, miniclientClasses, cleanMiniJar
408411
linuxMiniClientRelease.dependsOn miniclientJar
409-
sageJar.finalizedBy restoreSageConstants
412+
//sageJar.finalizedBy restoreSageConstants
410413

411414
// Eclipse project setup
412415
eclipse {

build/buildmplayer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ "$MPLAYER_NEW" = "1" ] ; then
3838
else
3939
# use legacy mplayer build
4040
cd ../third_party/mplayer/
41-
LDFLAGS="-no-pie" ./configure --host-cc=gcc --disable-gcc-check --enable-runtime-cpudetection --disable-mencoder --disable-gl --enable-directx --enable-largefiles --disable-langinfo --disable-tv --disable-dvdread --disable-dvdread-internal --disable-menu --disable-libdvdcss-internal --enable-pthreads --disable-debug --disable-freetype --disable-fontconfig --enable-stv --enable-stream-sagetv --disable-ivtv --disable-x264 --extra-libs=-lpthread --disable-png || { echo "Build failed, exiting."; exit 1; }
41+
LDFLAGS="-no-pie" ./configure --host-cc=gcc --disable-gcc-check --enable-runtime-cpudetection --disable-mencoder --disable-gl --enable-directx --enable-largefiles --disable-langinfo --disable-tv --disable-dvdread --disable-dvdread-internal --disable-menu --disable-libdvdcss-internal --enable-pthreads --disable-debug --disable-freetype --disable-fontconfig --enable-stv --enable-stream-sagetv --disable-ivtv --disable-x264 --extra-libs="-lpthread -pthread" --disable-png || { echo "Build failed, exiting."; exit 1; }
4242
make -j32 || { echo "Build failed, exiting."; exit 1; }
4343
echo "Built OLD mplayer"
4444
cp -v mplayer ../../build/elf

java/sage/SageConstants.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2015 The SageTV Authors. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package sage;
17+
18+
public final class SageConstants
19+
{
20+
private SageConstants()
21+
{
22+
// Non-instantiable
23+
}
24+
25+
public static final int BUILD_VERSION = 1056;
26+
}

native/so/HDHomeRun2.0/DTVChannel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,10 @@ int DTVChannel::setTuning(SageTuningParams *params)
463463
}
464464

465465
if(dbg->debug_source[0]) {
466-
if(dbg->source_fd > 0)
466+
if(dbg->source_fd != 0)
467467
fclose(dbg->source_fd);
468468
dbg->source_fd = fopen(dbg->debug_source, "r");
469-
if(dbg->source_fd > 0)
469+
if(dbg->source_fd != 0)
470470
flog("Native.log", "DTVChannel: Debug source file open: %s mode:%d (%d).\r\n",
471471
dbg->debug_source, dbg->debug_source_mode, dbg->source_fd );
472472
}
@@ -712,7 +712,7 @@ void DTVChannel::splitStream(void *buffer, size_t size)
712712
//flog("Native.log", "DTVChannel::splitStream(%p, %d this:0x%x 0x%x 0x%x)\r\n", buffer, size, (uint32_t)this,
713713
// parserEnabled, scanChannelEnabled );
714714
mBytesIn += (off_t)size;
715-
if ( 0 && dbg->dump_fd > 0 && dbg->dump_size > dbg->dumped_bytes )
715+
if ( 0 && dbg->dump_fd != 0 && dbg->dump_size > dbg->dumped_bytes )
716716
{
717717
fwrite( pData, 1, lDataLen, dbg->dump_fd );
718718
dbg->dumped_bytes += lDataLen;
@@ -1417,7 +1417,7 @@ int DTVChannel::scanChannelState( int *pScanState, int *pFoundChannelNum )
14171417
ASSERT( scanFilter != NULL );
14181418
*pScanState = ScanChannelState( scanFilter );
14191419
*pFoundChannelNum = ScanChannelNum( scanFilter );
1420-
return pScanState > 0;
1420+
return pScanState != 0;
14211421
}
14221422

14231423
int DTVChannel::scanChannelList( void** ppChannelList )

third_party/mplayer/stream/stream_sagetv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
664664
#ifdef CONFIG_DARWIN
665665
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
666666
#else
667-
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
667+
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
668668
#endif
669669
if (pthread_mutex_init(p->mutex, &attr) != 0)
670670
{

0 commit comments

Comments
 (0)