summaryrefslogtreecommitdiff
blob: 88c4f757a87cf92829d54b0f3158620df46aebc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..9} )

inherit cmake python-single-r1

DESCRIPTION="AWS SDK for C++"
HOMEPAGE="https://aws.amazon.com/sdk-for-cpp/"
SRC_URI="https://github.com/aws/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"

MODULES=(
	access-management apigateway appconfig backup batch budgets chime cloud-desktop cloud-dev cloud-media
	cloud-mobile cloudformation cloudfront cloudhsm cloudsearch cloudwatch cognito config dlm ebs ec2 ecr ecs
	eks elasticache elasticbeanstalk elastic-inference elasticloadbalancing elasticmapreduce email es events
	forecast frauddetector fsx globalaccelerator iot kendra kinesis kms lambda lex license-manager lightsail
	lookoutvision machinelearning macie managedblockchain marketplace mwaa networkmanager opsworks
	organizations other outposts personalize polly qldb queues rds rekognition resource-groups route53 s3
	sagemaker secretsmanager securityhub serverlessrepo shield sns sqs textract timestream transcribe
	translate waf
)

IUSE="+http pulseaudio +rtti +ssl static-libs test unity-build ${MODULES[*]}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"

DEPEND="
	http? ( net-misc/curl:= )
	pulseaudio? ( media-sound/pulseaudio )
	ssl? (
		dev-libs/openssl:0=
	)
	>=dev-libs/aws-c-common-0.4.62:=[static-libs=]
	>=dev-libs/aws-c-event-stream-0.2.5:=[static-libs=]
	>=dev-libs/aws-checksums-0.1.10:=[static-libs=]
	sys-libs/zlib
"
RDEPEND="
	${DEPEND}
	${PYTHON_DEPS}
"

PATCHES=(
	"${FILESDIR}"/${PN}-upgrade_android-build_build_and_test_android_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_binary-release-pipeline_lambda_publish_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_CI_ConstructReleaseDoc_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_CI_ExtractBuildArgs_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_CI_handle_release_notification_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_CI_move_release_doc_to_models_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_doc_crosslinks_generate_cross_link_data_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_build_3rdparty_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_build_example_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_dummy_web_server_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_endpoints_checker_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_gather_3rdparty_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_generate_sdks_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_renew_license_py-3.9.patch
	"${FILESDIR}"/${PN}-upgrade_scripts_run_integration_tests_py-3.9.patch
	"${FILESDIR}"/${P}-remove_Werror_from_FLAGS.patch
)

src_configure() {
	local mybuildtargets="core"

	for module in ${MODULES[@]}; do
		if use ${module}; then
			if [ "${module}" = "access-management" ] ; then
				mybuildtargets+=";${module};accessanalyzer;acm;acm-pca;dataexchange;iam"
				mybuildtargets+=";identity-management;identitystore;ram;sso;sso-admin;sso-oidc;sts"
			elif [ "${module}" = "apigateway" ] ; then
				mybuildtargets+=";${module};apigatewaymanagementapi;apigatewayv2"
			elif [ "${module}" = "budgets" ] ; then
				mybuildtargets+=";${module};ce;cur"
			elif [ "${module}" = "cloud-desktop" ] ; then
				mybuildtargets+=";appstream;workdocs;worklink;workmail;workmailmessageflow;workspaces"
			elif [ "${module}" = "cloud-dev" ] ; then
				mybuildtargets+=";cloud9;codeartifact;codebuild;codecommit;codedeploy;codeguruprofiler"
				mybuildtargets+=";codeguru-reviewer;codepipeline;codestar;codestar-connections"
				mybuildtargets+=";codestar-notifications;honeycode;xray"
				if ! use "queues"; then
					mybuildtargets+=";queues"
				fi
			elif [ "${module}" = "cloud-media" ] ; then
				mybuildtargets+=";elastictranscoder;mediaconnect;mediaconvert;medialive;mediapackage"
				mybuildtargets+=";mediapackage-vod;mediastore;mediastore-data;mediatailor"
			elif [ "${module}" = "cloud-mobile" ] ; then
				mybuildtargets+=";amplify;appsync;devicefarm;mobile;mobileanalytics;pinpoint"
				mybuildtargets+=";pinpoint-email;sms-voice"
				if ! use "sns"; then
					mybuildtargets+=";sns"
				fi
			elif [ "${module}" = "cloudhsm" ] ; then
				mybuildtargets+=";${module};cloudhsmv2"
			elif [ "${module}" = "cloudsearch" ] ; then
				mybuildtargets+=";${module};cloudsearchdomain"
			elif [ "${module}" = "cloudwatch" ] ; then
				mybuildtargets+=";application-insights;appmesh;auditmanager;cloudtrail;compute-optimizer"
				mybuildtargets+=";detective;devops-guru;guardduty;health;inspector;logs;monitoring;synthetics"
			elif [ "${module}" = "cognito" ] ; then
				mybuildtargets+=";cognito-identity;cognito-idp;cognito-sync"
			elif [ "${module}" = "dynamodb" ] ; then
				mybuildtargets+=";${module};dax;dynamodbstreams"
			elif [ "${module}" = "ec2" ] ; then
				mybuildtargets+=";${module};autoscaling;autoscaling-plans;application-autoscaling"
				mybuildtargets+=";ec2-instance-connect;elasticfilesystem;imagebuilder;savingsplans"
			elif [ "${module}" = "ecr" ] ; then
				mybuildtargets+=";${module};ecr-public"
			elif [ "${module}" = "eks" ] ; then
				mybuildtargets+=";${module};emr-containers"
			elif [ "${module}" = "elasticloadbalancing" ] ; then
				mybuildtargets+=";${module};elasticloadbalancingv2"
			elif [ "${module}" = "email" ] ; then
				mybuildtargets+=";${module};sesv2"
			elif [ "${module}" = "events" ] ; then
				mybuildtargets+=";${module};eventbridge"
			elif [ "${module}" = "forecast" ] ; then
				mybuildtargets+=";${module};forecastquery"
			elif [ "${module}" = "iot" ] ; then
				mybuildtargets+=";${module};greengrass;iot1click-devices;iot1click-projects"
				mybuildtargets+=";iotanalytics;iot-data;iotevents;iotevents-data;iot-jobs-data"
				mybuildtargets+=";iotsecuretunneling;iotsitewise;iotthingsgraph"
			elif [ "${module}" = "kinesis" ] ; then
				mybuildtargets+=";${module};firehose;ivs;kinesisanalytics;kinesisanalyticsv2"
				mybuildtargets+=";kinesisvideo;kinesis-video-archived-media;kinesis-video-media"
				mybuildtargets+=";kinesis-video-signaling"
			elif [ "${module}" = "lex" ] ; then
				mybuildtargets+=";${module};lex-models"
			elif [ "${module}" = "macie" ] ; then
				mybuildtargets+=";${module};macie2"
			elif [ "${module}" = "marketplace" ] ; then
				mybuildtargets+=";marketplacecommerceanalytics;marketplace-catalog"
				mybuildtargets+=";marketplace-entitlement;meteringmarketplace;pricing"
				mybuildtargets+=";servicecatalog-appregistry"
			elif [ "${module}" = "opsworks" ] ; then
				mybuildtargets+=";${module};opsworkscm"
			elif [ "${module}" = "other" ] ; then
				mybuildtargets+=";AWSMigrationHub;alexaforbusiness;appflow;braket;clouddirectory"
				mybuildtargets+=";comprehend;comprehendmedical;connect;connect-contact-lens"
				mybuildtargets+=";connectparticipant;customer-profiles;datapipeline;databrew;datasync"
				mybuildtargets+=";directconnect;discovery;dms;docdb;ds;dynamodb;gamelift;glue"
				mybuildtargets+=";groundstation;healthlake;importexport;kafka;lakeformation"
				mybuildtargets+=";migrationhub-config;mq;mturk-requester;neptune;quicksight;redshift"
				mybuildtargets+=";robomaker;sdb;schemas;service-quotas;servicecatalog;servicediscovery"
				mybuildtargets+=";signer;sms;snowball;ssm;states;storagegateway;support;swf"
			elif [ "${module}" = "outposts" ] ; then
				mybuildtargets+=";${module};s3outposts"
			elif [ "${module}" = "personalize" ] ; then
				mybuildtargets+=";${module};personalize-events;personalize-runtime"
			elif [ "${module}" = "polly" ] ; then
				mybuildtargets+=";${module};text-to-speech"
			elif [ "${module}" = "qldb" ] ; then
				mybuildtargets+=";${module};qldb-session"
			elif [ "${module}" = "rds" ] ; then
				mybuildtargets+=";${module};pi;rds-data"
			elif [ "${module}" = "resource-groups" ] ; then
				mybuildtargets+=";${module};resourcegroupstaggingapi"
			elif [ "${module}" = "route53" ] ; then
				mybuildtargets+=";${module};route53domains;route53resolver"
			elif [ "${module}" = "s3" ] ; then
				mybuildtargets+=";${module};athena;awstransfer;glacier;s3-encryption;s3control;transfer"
			elif [ "${module}" = "sagemaker" ] ; then
				mybuildtargets+=";${module};sagemaker-a2i-runtime;sagemaker-edge"
				mybuildtargets+=";sagemaker-featurestore-runtime;sagemaker-runtime"
			elif [ "${module}" = "timestream" ] ; then
				mybuildtargets+=";timestream-query;timestream-write"
			elif [ "${module}" = "transcribe" ] ; then
				mybuildtargets+=";${module};transcribestreaming"
			elif [ "${module}" = "waf" ] ; then
				mybuildtargets+=";${module};fms;network-firewall;waf-regional;wafv2"
			else
				mybuildtargets+=";${module}"
			fi
		fi
	done

	local mycmakeargs=(
		-DAUTORUN_UNIT_TESTS=$(usex test)
		-DBUILD_DEPS=NO
		-DBUILD_ONLY="${mybuildtargets}"
		-DBUILD_SHARED_LIBS=$(usex !static-libs)
		-DCPP_STANDARD=17
		-DENABLE_RTTI=$(usex rtti)
		-DENABLE_TESTING=$(usex test)
		-DENABLE_UNITY_BUILD=$(usex unity-build)
		-DNO_ENCRYPTION=$(usex !ssl)
		-DNO_HTTP_CLIENT=$(usex !http)
	)
	cmake_src_configure
}