mirror of
https://gitee.com/openharmony/third_party_cups
synced 2024-11-23 09:59:45 +00:00
94be335187
Signed-off-by: dongzhengkuan <dongzhengkuan@huawei.com>
355 lines
9.0 KiB
Plaintext
355 lines
9.0 KiB
Plaintext
# Copyright (c) 2023 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import("//build/ohos.gni")
|
|
import("./cups.gni")
|
|
|
|
config_dir = "."
|
|
cups_code_dir = "cups-2.4.0/"
|
|
core_code_dir = "$cups_code_dir/cups/"
|
|
filter_code_dir = "$cups_code_dir/filter"
|
|
backend_code_dir = "$cups_code_dir/backend"
|
|
ppdc_code_dir = "$cups_code_dir/ppdc"
|
|
scheduler_code_dir = "$cups_code_dir/scheduler"
|
|
|
|
SUBSYSTEM_NAME = "thirdparty"
|
|
PART_NAME = "cups"
|
|
|
|
group("third_party_cups") {
|
|
deps = [
|
|
":cups",
|
|
":cups-deviced",
|
|
":cups-exec",
|
|
":cupsd",
|
|
":cupsfilter",
|
|
":ipp",
|
|
":mime.convs",
|
|
":mime.types",
|
|
":rastertopwg",
|
|
]
|
|
}
|
|
|
|
config("cups_config") {
|
|
defines = cups_defines
|
|
include_dirs = [
|
|
"$config_dir",
|
|
"$cups_code_dir",
|
|
"$core_code_dir",
|
|
"//third_party/libusb/libusb",
|
|
"//third_party/openssl/include",
|
|
]
|
|
|
|
cflags = [
|
|
"-Wno-unused-function",
|
|
"-Wno-unused-value",
|
|
"-Wno-implicit-function-declaration",
|
|
"-Wno-int-conversion",
|
|
]
|
|
}
|
|
|
|
ohos_shared_library("cups") {
|
|
sources = [
|
|
"$core_code_dir/adminutil.c",
|
|
"$core_code_dir/array.c",
|
|
"$core_code_dir/auth.c",
|
|
"$core_code_dir/backchannel.c",
|
|
"$core_code_dir/backend.c",
|
|
"$core_code_dir/debug.c",
|
|
"$core_code_dir/dest-job.c",
|
|
"$core_code_dir/dest-localization.c",
|
|
"$core_code_dir/dest-options.c",
|
|
"$core_code_dir/dest.c",
|
|
"$core_code_dir/dir.c",
|
|
"$core_code_dir/encode.c",
|
|
"$core_code_dir/file.c",
|
|
"$core_code_dir/getdevices.c",
|
|
"$core_code_dir/getifaddrs.c",
|
|
"$core_code_dir/getputfile.c",
|
|
"$core_code_dir/globals.c",
|
|
"$core_code_dir/hash.c",
|
|
"$core_code_dir/http-addr.c",
|
|
"$core_code_dir/http-addrlist.c",
|
|
"$core_code_dir/http-support.c",
|
|
"$core_code_dir/http.c",
|
|
"$core_code_dir/ipp-file.c",
|
|
"$core_code_dir/ipp-support.c",
|
|
"$core_code_dir/ipp-vars.c",
|
|
"$core_code_dir/ipp.c",
|
|
"$core_code_dir/langprintf.c",
|
|
"$core_code_dir/language.c",
|
|
"$core_code_dir/md5.c",
|
|
"$core_code_dir/md5passwd.c",
|
|
"$core_code_dir/notify.c",
|
|
"$core_code_dir/options.c",
|
|
"$core_code_dir/ppd-attr.c",
|
|
"$core_code_dir/ppd-cache.c",
|
|
"$core_code_dir/ppd-conflicts.c",
|
|
"$core_code_dir/ppd-custom.c",
|
|
"$core_code_dir/ppd-emit.c",
|
|
"$core_code_dir/ppd-localize.c",
|
|
"$core_code_dir/ppd-mark.c",
|
|
"$core_code_dir/ppd-page.c",
|
|
"$core_code_dir/ppd-util.c",
|
|
"$core_code_dir/ppd.c",
|
|
"$core_code_dir/pwg-media.c",
|
|
"$core_code_dir/raster-error.c",
|
|
"$core_code_dir/raster-interpret.c",
|
|
"$core_code_dir/raster-interstub.c",
|
|
"$core_code_dir/raster-stream.c",
|
|
"$core_code_dir/raster-stubs.c",
|
|
"$core_code_dir/request.c",
|
|
"$core_code_dir/sidechannel.c",
|
|
"$core_code_dir/snmp.c",
|
|
"$core_code_dir/snprintf.c",
|
|
"$core_code_dir/string.c",
|
|
"$core_code_dir/tempfile.c",
|
|
"$core_code_dir/thread.c",
|
|
"$core_code_dir/tls-openssl.c",
|
|
"$core_code_dir/tls.c",
|
|
"$core_code_dir/transcode.c",
|
|
"$core_code_dir/usersys.c",
|
|
"$core_code_dir/util.c",
|
|
]
|
|
|
|
deps = [
|
|
"//third_party/openssl:libcrypto_shared",
|
|
"//third_party/openssl:libssl_shared",
|
|
"//third_party/zlib:libz",
|
|
]
|
|
|
|
public_configs = [ ":cups_config" ]
|
|
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_shared_library("cupsimage") {
|
|
sources = [
|
|
"$core_code_dir/raster-interstub.c",
|
|
"$core_code_dir/raster-stubs.c",
|
|
]
|
|
|
|
deps = [ "//third_party/cups:cups" ]
|
|
|
|
public_configs = [ ":cups_config" ]
|
|
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("rastertopwg") {
|
|
sources = [ "$filter_code_dir/rastertopwg.c" ]
|
|
|
|
deps = [ "//third_party/cups:cups" ]
|
|
|
|
install_enable = true
|
|
module_install_dir = "$cups_serverbin_dir/filter"
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_shared_library("backend") {
|
|
sources = [
|
|
"$backend_code_dir/ieee1284.c",
|
|
"$backend_code_dir/network.c",
|
|
"$backend_code_dir/runloop.c",
|
|
"$backend_code_dir/snmp-supplies.c",
|
|
]
|
|
|
|
deps = [ "//third_party/cups:cups" ]
|
|
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("ipp") {
|
|
sources = [ "$backend_code_dir/ipp.c" ]
|
|
|
|
deps = [
|
|
"//third_party/cups:backend",
|
|
"//third_party/cups:cups",
|
|
]
|
|
|
|
install_enable = true
|
|
module_install_dir = "$cups_serverbin_dir/backend"
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
#end of backend
|
|
|
|
#ppdc
|
|
ohos_shared_library("cupsppdc") {
|
|
sources = [
|
|
"$ppdc_code_dir/ppdc-array.cxx",
|
|
"$ppdc_code_dir/ppdc-attr.cxx",
|
|
"$ppdc_code_dir/ppdc-catalog.cxx",
|
|
"$ppdc_code_dir/ppdc-choice.cxx",
|
|
"$ppdc_code_dir/ppdc-constraint.cxx",
|
|
"$ppdc_code_dir/ppdc-driver.cxx",
|
|
"$ppdc_code_dir/ppdc-file.cxx",
|
|
"$ppdc_code_dir/ppdc-filter.cxx",
|
|
"$ppdc_code_dir/ppdc-font.cxx",
|
|
"$ppdc_code_dir/ppdc-group.cxx",
|
|
"$ppdc_code_dir/ppdc-import.cxx",
|
|
"$ppdc_code_dir/ppdc-mediasize.cxx",
|
|
"$ppdc_code_dir/ppdc-message.cxx",
|
|
"$ppdc_code_dir/ppdc-option.cxx",
|
|
"$ppdc_code_dir/ppdc-profile.cxx",
|
|
"$ppdc_code_dir/ppdc-shared.cxx",
|
|
"$ppdc_code_dir/ppdc-source.cxx",
|
|
"$ppdc_code_dir/ppdc-string.cxx",
|
|
"$ppdc_code_dir/ppdc-variable.cxx",
|
|
]
|
|
|
|
deps = [ "//third_party/cups:cups" ]
|
|
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("ppdc") {
|
|
sources = [ "$ppdc_code_dir/ppdc.cxx" ]
|
|
|
|
deps = [
|
|
"//third_party/cups:cups",
|
|
"//third_party/cups:cupsppdc",
|
|
]
|
|
|
|
install_enable = true
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
#end of ppdc
|
|
|
|
#scheduler
|
|
ohos_shared_library("cupsmime") {
|
|
sources = [
|
|
"$scheduler_code_dir/filter.c",
|
|
"$scheduler_code_dir/mime.c",
|
|
"$scheduler_code_dir/type.c",
|
|
]
|
|
|
|
deps = [ "//third_party/cups:cups" ]
|
|
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("cupsd") {
|
|
sources = [
|
|
"$scheduler_code_dir/auth.c",
|
|
"$scheduler_code_dir/banners.c",
|
|
"$scheduler_code_dir/cert.c",
|
|
"$scheduler_code_dir/classes.c",
|
|
"$scheduler_code_dir/client.c",
|
|
"$scheduler_code_dir/colorman.c",
|
|
"$scheduler_code_dir/conf.c",
|
|
"$scheduler_code_dir/dirsvc.c",
|
|
"$scheduler_code_dir/env.c",
|
|
"$scheduler_code_dir/file.c",
|
|
"$scheduler_code_dir/ipp.c",
|
|
"$scheduler_code_dir/job.c",
|
|
"$scheduler_code_dir/listen.c",
|
|
"$scheduler_code_dir/log.c",
|
|
"$scheduler_code_dir/main.c",
|
|
"$scheduler_code_dir/network.c",
|
|
"$scheduler_code_dir/policy.c",
|
|
"$scheduler_code_dir/printers.c",
|
|
"$scheduler_code_dir/process.c",
|
|
"$scheduler_code_dir/quotas.c",
|
|
"$scheduler_code_dir/select.c",
|
|
"$scheduler_code_dir/server.c",
|
|
"$scheduler_code_dir/statbuf.c",
|
|
"$scheduler_code_dir/subscriptions.c",
|
|
"$scheduler_code_dir/sysman.c",
|
|
]
|
|
|
|
deps = [
|
|
"//third_party/cups:cups",
|
|
"//third_party/cups:cupsmime",
|
|
]
|
|
|
|
install_enable = true
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("cupsfilter") {
|
|
sources = [ "$scheduler_code_dir/cupsfilter.c" ]
|
|
|
|
deps = [
|
|
"//third_party/cups:cups",
|
|
"//third_party/cups:cupsmime",
|
|
]
|
|
|
|
install_enable = true
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("cups-deviced") {
|
|
sources = [
|
|
"$scheduler_code_dir/cups-deviced.c",
|
|
"$scheduler_code_dir/util.c",
|
|
]
|
|
|
|
deps = [
|
|
"//third_party/cups:cups",
|
|
"//third_party/cups:cupsmime",
|
|
]
|
|
|
|
install_enable = true
|
|
module_install_dir = "$cups_serverbin_dir/daemon"
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_executable("cups-exec") {
|
|
sources = [ "$scheduler_code_dir/cups-exec.c" ]
|
|
|
|
deps = []
|
|
|
|
install_enable = true
|
|
module_install_dir = "$cups_serverbin_dir/daemon"
|
|
public_configs = [ ":cups_config" ]
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_prebuilt_etc("mime.convs") {
|
|
exec_script(rebase_path("//third_party/cups/generate_mime_convs.py"),
|
|
[ rebase_path("//third_party/cups/cups-2.4.0/conf") ])
|
|
source = "$cups_code_dir/conf/mime.convs"
|
|
relative_install_dir = "cups/share/mime"
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|
|
|
|
ohos_prebuilt_etc("mime.types") {
|
|
source = "$cups_code_dir/conf/mime.types"
|
|
relative_install_dir = "cups/share/mime"
|
|
subsystem_name = "$SUBSYSTEM_NAME"
|
|
part_name = "$PART_NAME"
|
|
}
|